[Image-SIG] Re: Problem using crop.

Fredrik Lundh fredrik at pythonware.com
Wed Jun 2 16:31:16 EDT 2004

Manik Bali wrote:

> I have an image that has pixel values that range from 0 to 23
> But when I take a peice( subset ) of this image
> interior=im.crop((2890,79851,473,3202))

have you checked interior.size ?

the syntax is (left, top, right, bottom) -- the box you're using
has negative size.

> and give interior.getextrema() it shows that the interior has values from
> (0,255). interior is supposed to be a subset of the original image how
> does it have more pixel values than  0 to 23.
> The list(im.getdata()) shows a list of 256 non zero elements

the behaviour for negative crop sizes appears to be undefined
(when testing this, I just managed to crash Python...).


More information about the Image-SIG mailing list