[Image-SIG] reaching memory limits with crop method]

Fredrik Lundh fredrik at pythonware.com
Sat Sep 10 15:37:50 CEST 2005


Adam J Smith wrote:

> Very interesting, thank you. Although I think the PIL documentation is
> quite excellent, there are a few aspects of PIL that have always been
> unclear to me, and the tile attribute is one of them.

if you look at the stuff I release, I tend to separate "official interfaces"
from "experimental" stuff (not always documented) and "internal stuff"'
(usually not documented); the tile attribute is more of the latter.

(but it is discussed in the "Writing Your Own File Decoder" appendix,
together with a description of the raw codec, so I guess it's at least
half-official by now...)

> So it also sounds like this only works for uncompressed images, and that
> somehow checking for this is a good idea? Sorry for such basic questions,
> this kind of image processing is still pretty new to me.

my mistake; the example I had in mind showed how you could split huge
tiles into smaller tiles.  to do that, you have to manipulate the tile offsets,
which only works well for uncompressed images (where you can use the
stride argument).

if you're reading individual tiles, or combining tiles, your code will work
for any compression mode.

</F> 





More information about the Image-SIG mailing list