[IPOL discuss] Vignette image compression in archive

Bertrand Kerautret bertrand.kerautret at univ-lorraine.fr
Tue Mar 25 15:04:23 CET 2014


Thank Miguel,
Agree, no pb we can use jpeg for the moment (in the archive) and update 
eventually in png in the future (but not very important).
Cheers,
Bertrand



Le 25/03/2014 11:09, Miguel Colom a écrit :
> Quoting Bertrand Kerautret <bertrand.kerautret at univ-lorraine.fr>:
>> Dear All,
>> In the test of the demonstration 68, I see that the vignette images of
>> the archive gallery appear with low quality in comparison to the
>> original ones.
>> In particular it is visible on image representing a distance map in
>> gray scale format. For instance you can see it here:
>> http://dev.ipol.im/~kerautre/ipol_demo/68/archive/
>> The vignette images look as if it was near binary images while the
>> original are more in grayscale.
>> The format used is png, and by testing it with jpeg it looks better
>> (see last archive).
>> Did there is a simple way to define the vignette quality in the app.py
>> file ? (else it is not a problem we can use jpeg i think)
>> Thank for your help.
>> All the best.
>> Bertrand
>
> I've been looking at this and it seems that the problem is because we
> use PIL to process the images (the crop the input images, to create
> thumbnails, etc).
>
> When the image is encoded in 8 bits, everything works files.
> However, when it's 16 bits (as in your case), PIL is unable to deal with
> them properly.
>
> It seems that it took your 16-bit grayscale image and "converted" it
> into 8 bits by saturating all pixels whose intensity is over 255. That's
> why it looks like a binary image.
>
> We should change PIL to something else or add some kind of 16 bits
> extension. It's something that we know we have to do, but we haven't had
> the time to start it yet.
>
> Best,
> Miguel
>
>
> --
> IPOL - Image Processing On Line   - http://ipol.im/
>
> contact     edit at ipol.im          - http://www.ipol.im/meta/contact/
> news+feeds  twitter @IPOL_journal - http://www.ipol.im/meta/feeds/
> announces   announce at list.ipol.im - http://tools.ipol.im/mm/announce/
> discussions discuss at list.ipol.im  - http://tools.ipol.im/mm/discuss/



More information about the discuss mailing list