libwebp/imageio
Pascal Massimino 9273e441da fix TIFF encoder regarding rgbA/RGBA
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
2017-03-03 10:36:29 -08:00
..
Android.mk imageio: add limited PNM support for reading 2017-02-01 07:41:56 +00:00
image_dec.c Add limited PAM decoding support 2017-03-03 11:19:48 +01:00
image_dec.h imageio: add limited PNM support for reading 2017-02-01 07:41:56 +00:00
image_enc.c fix TIFF encoder regarding rgbA/RGBA 2017-03-03 10:36:29 -08:00
image_enc.h libimageenc.a: extract image-saving code from dwebp 2016-09-08 19:11:26 -07:00
imageio_util.c ImgIoUtilWriteFile(): use ImgIoUtilSetBinaryMode 2017-02-26 14:05:42 -08:00
imageio_util.h imageio_util: add ImgIoUtilCheckSizeArgumentsOverflow 2016-10-07 14:41:48 -07:00
jpegdec.c jpegdec: correct ContextFill signature 2016-12-09 18:20:25 -08:00
jpegdec.h pngdec.c,jpegdec.[hc]: remove unnecessary includes 2016-07-20 12:12:14 -07:00
Makefile.am imageio: add limited PNM support for reading 2017-02-01 07:41:56 +00:00
metadata.c move examples/{example_util,image_dec} to imageio/ 2016-07-19 19:06:29 -07:00
metadata.h move examples/{example_util,image_dec} to imageio/ 2016-07-19 19:06:29 -07:00
pngdec.c replace 'ptr + y * stride' by 'ptr += stride' 2017-01-04 00:54:23 -08:00
pngdec.h move examples/{example_util,image_dec} to imageio/ 2016-07-19 19:06:29 -07:00
pnmdec.c Add limited PAM decoding support 2017-03-03 11:19:48 +01:00
pnmdec.h imageio: add limited PNM support for reading 2017-02-01 07:41:56 +00:00
tiffdec.c fix TIFF encoder regarding rgbA/RGBA 2017-03-03 10:36:29 -08:00
tiffdec.h move examples/{example_util,image_dec} to imageio/ 2016-07-19 19:06:29 -07:00
webpdec.c ReadWebP: decode directly into a pre-allocated buffer 2017-02-03 14:41:46 +01:00
webpdec.h remove the dependency to stop_watch.[ch] in imageio 2016-12-12 22:01:36 +01:00
wicdec.c imageio/*dec,Read*: add input parameter checks 2016-10-12 20:49:30 -07:00
wicdec.h move examples/{example_util,image_dec} to imageio/ 2016-07-19 19:06:29 -07:00