Commit Graph

5 Commits

Author SHA1 Message Date
James Zern
f324b7f9ba cosmetics: normalize fn proto & decl param names
BUG=webp:355

Change-Id: If020eb3b064cdb11853d1fa47058acae34752ce3
2017-08-26 14:17:31 -07:00
Vincent Rabaud
c8f14093ac Fix code to compile with C++.
Change-Id: I324236440cb853cb3c8fb278ef22449cd9772ad7
2017-05-15 16:22:03 +02:00
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
Pascal Massimino
259e98286a replace 'ptr + y * stride' by 'ptr += stride'
This is to prevent potential overflow.

Change-Id: I9d21cfe790ba975bd5e117b025ea4d9deaeae4ab
2017-01-04 00:54:23 -08:00
Pascal Massimino
af1ad3e2dd libimageenc.a: extract image-saving code from dwebp
BUG=webp:277
Change-Id: I2c0e1df7b13b1f77474b5478048fef022e90f77a
2016-09-08 19:11:26 -07:00