[Image-SIG] Question about Thumbnail-Mode.

Dieter Krachtus DieterKrachtus at web.de
Thu Mar 9 12:31:55 CET 2006


Hi,

I am in science and want to understand certain things PIL does better...
 
One can get jpg-thumbnails of images with PIL. This happens pretty fast 
- so PIL cannot read the complete file, but use some trick. I guess it 
just reads in a 2^x (i.e. 1/2, 1/4, 1/8, 1/16, ...) of the actual 
image-data. Just to understand how this is done, is my qustion:

1. Does PIL look into the "header" of the jpg file and finds out from 
where to where the actual image data goes and how the dimension 
(width/height in pixel) of the image is ?

2. Then whats next? Does PIL read only e.g. every 16th byte, or how is 
this done - if you do this - is the resulting stream of bytes still 
interpretable as a jpg ?

3. Is there some limit to how many pixel one can leave out ?

4. Just fill in a question you would ask and might be interesting to me 
;), and answer it yourself...

Cheers,
jago



More information about the Image-SIG mailing list