[Image-SIG] PIL and out-of-bounds crop-coordinates
by Markus Meyer other posts by this author
Jun 22 2004 2:09PM messages near this date
[Image-SIG] $73221
|
[Image-SIG] $91823
Hi everyone,
I'm using PIL 1.1.4 (on Linux and Windows) to do some extensive cropping
of images. I often have out-of-bounds crop parameters, e.g. say I have a
100x100 image and want to "crop" the image using the rect
(10,10,150,150). With these parameters, part of the image at the upper
left corner is cropped, but at the lower right corner, empty space is
added. Tests have shown that PIL does this correctly, but (not
surprisingly) adds random stuff at the "empty" places.
Is this use of crop legitimate? Can I be sure that no segmentation
faults or other exceptions occur when using crop this way? If yes, how
can I tell PIL which background it should use for the empty parts of the
newly created picture? If not, what simple solution would you suggest as
workaround?
Thanks in advance
Markus
_______________________________________________
Image-SIG maillist - Image-SIG@[...].org
http://mail.python.org/mailman/listinfo/image-sig
|