[Image-SIG] problems with Image.crop

Kevin Cazabon KCAZA@cymbolic.com
Mon, 07 Jun 1999 17:18:30 -0700


It seems that I get a few nagging problems when using the Image.crop function:

If I do a crop function on an Image object, I very frequently get AttributeErrors
afterwards when I try to perform other methods (such as Image.convert).  These
AttributeErrors are always related to palette and info (palette stops it in its
tracks first).

I've gotten around it for now by making a deepcopy of the .palette and .info
attributes of the image BEFORE doing a crop, then re-assigning them to the Image, but
it's a pain in the butt.

Here's the actual error, please let me know if you have any hints.

Thanks,

Kevin Cazabon

Traceback (innermost last):
  File "<interactive input>", line 0, in ?
  File "D:\Python\Fusion_Analyzer_200Beta_allfiles\Unzipped Fusion Analyzer
2.00BETA\lib\imaging\Image.py", line 327, in convert
    return self._makeself(im)
  File "D:\Python\Fusion_Analyzer_200Beta_allfiles\Unzipped Fusion Analyzer
2.00BETA\lib\imaging\Image.py", line 223, in _makeself
    new.palette = self.palette
AttributeError: palette