9273e441da
Encoder: We were always using ExtraSamples=1, which means associated-alpha. But we don't need the (lossy) excursion to rgbA format. We can save the samples as RGBA directly, by changing ExtraSamples to '2'. The TIFF encoder now checks the colorspace properly, to handle premultiplied format as well as non-premultiplied. Decoder: The result of TIFFReadRGBAImageOriented() is always pre-multiply. So, in case an alpha channel is present, we need to unmultiply it before calling WebPPictureImportRGBA(). See: https://www.itu.int/itudoc/itu-t/com16/tiff-fx/docs/tiff6.pdf (page 31) and also http://www.asmail.be/msg0055469184.html Change-Id: I3258bfdb0eb2e1a53d6c04414f55edb2926c938c |
||
---|---|---|
.. | ||
Android.mk | ||
image_dec.c | ||
image_dec.h | ||
image_enc.c | ||
image_enc.h | ||
imageio_util.c | ||
imageio_util.h | ||
jpegdec.c | ||
jpegdec.h | ||
Makefile.am | ||
metadata.c | ||
metadata.h | ||
pngdec.c | ||
pngdec.h | ||
pnmdec.c | ||
pnmdec.h | ||
tiffdec.c | ||
tiffdec.h | ||
webpdec.c | ||
webpdec.h | ||
wicdec.c | ||
wicdec.h |