this quiets a -Wclobbered warning on const has_alpha under gcc-7 and
brings the variables closer to their first use.
Change-Id: I8a24f275b7ff34a94d47b576bcf276dbedac2121
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