Make the image orientation only optionally applied for TIFF images
to match the new image handler flags.
The default however remains to apply transformation, as opposed
to JPEGs.
The patch also adds the capability to write metadata orientation.
Change-Id: Ie24664516138641342ab6d7559d591f38b9f1e8a
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
The TIFFReadRGBAImageOriented method turns out to return colors with
alpha premultiplied by default. The only reason we pass our own tests
is because we also save the colors incorrectly unpremultiplied.
The patch fixes the format type of the returned images, and explictily
writes the how alpha should be interpreted in the saved files.
Change-Id: Ie1c3881acfe07eae25ca735adf243c1636f656a0
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Split reading TIFF headers from the decoding to make it
possible to read correct metadata on undecoded images.
This fixes reading the image format from the QImageReader,
and is necessary for later patches.
Change-Id: Ida27e98252bf95459d87354586d4a5fba348efcb
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.
Change-Id: I6aafb5f38bfaf68a9f4eaca69a56006db5cd8843
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
We currently save all non-indexed images as RGBA TIFF files. We should
save them without an alpha channel, to save space and maintain the
information that they are opaque.
Task-number: QTBUG-18475
Change-Id: Id656f4078ea0a1b88235fb04add99a4680422354
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
We write TIFF files using big-endian RGBA, by using the RGBA8888 QImage
format we can remove the manual conversion done in qtiffhandler.
Change-Id: I4a7f4810ce4332d1608813d9cd6371bc13d94df0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
If there is no TIFFTAG_RESOLUTIONUNIT record, the value of resUnit
should be RESUNIT_INCH and not RESUNIT_NONE.
Task-number: QTBUG-22322
Change-Id: Idb1ffeec85fdb5a23d93fa53505440a9e2f8914e
Reviewed-by: aavit <eirik.aavitsland@digia.com>
Change copyrights and license headers from Nokia to Digia
Change-Id: Ia126f46d5f67e9acf9e2efc8bf99c50fd1c22809
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Moved out from qtbase.
Task-number: QTBUG-23887
Change-Id: I57d30173e6624d41dba1610084a7ed949ae84d1d
Reviewed-by: aavit <qt_aavit@ovi.com>
Sanity-Review: Kent Hansen <kent.hansen@nokia.com>