Rewrite as_grey property without enhanced property decorators to be python 2.5 compliant

This commit is contained in:
Tony
2009-11-12 10:53:12 -05:00
parent 80ea81fca3
commit 14975cb891
+4 -5
View File
@@ -230,20 +230,19 @@ class ImageCollection(object):
def files(self):
return self._files
@property
def as_grey(self):
def _get_as_grey(self):
"""Whether images are converted to grey-scale.
If this property is changed, all images in memory get reloaded.
"""
return self._as_grey
@as_grey.setter
def as_grey(self, newgrey):
def _set_as_grey(self, newgrey):
if not newgrey == self._as_grey:
self._as_grey = newgrey
self.reload()
as_grey = property(_get_as_grey, _set_as_grey)
@property
def conserve_memory(self):
return self._conserve_memory