Commit Graph

13 Commits

Author SHA1 Message Date
Allan Sandfeld Jensen a1d412aec4 Optional application of orientation for TIFF
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>
2015-05-19 08:32:10 +00:00
Allan Sandfeld Jensen 8363c855f5 Correctly interpret RGBA tiff images as premultiplied
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>
2015-05-12 11:06:41 +00:00
Allan Sandfeld Jensen 4c00a26fc5 Clean up reading TIFF headers
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>
2015-05-04 17:55:14 +00:00
Liang Qi 5b1a331812 Merge remote-tracking branch 'origin/5.4' into 5.5
Change-Id: Ib6f1512a15f2714a712ff82df55a9d3de8e46ffd
2015-04-15 09:10:02 +02:00
Allan Sandfeld Jensen f65a4c931b Replace malloc'ed tables with QVarLengthArray
Basic cleanup using proper Qt classes instead of malloc.

Change-Id: I532b47aac7cfe15a5963371224288bec08135f25
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-03-17 22:09:10 +00:00
Jani Heikkinen 6aeeadf865 Update copyright headers
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>
2015-02-11 13:20:21 +00:00
Jani Heikkinen dd5634f8f4 Update license headers and add new licenses
- Renamed LICENSE.LGPL to LICENSE.LGPLv21
- Added LICENSE.LGPLv3 & LICENSE.GPLv2
- Removed LICENSE.GPL

Change-Id: I803e1abdc6f126d5251746422e16fff7463f2dff
Reviewed-by: Antti Kokko <antti.kokko@digia.com>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
2014-08-25 06:52:29 +02:00
Allan Sandfeld Jensen 218c48b5c3 Save opaque images as opaque TIFF files
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>
2014-07-04 14:47:08 +02:00
Allan Sandfeld Jensen 5c4036eeb2 Use RGBA8888 format to simplify TIFF writing
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>
2014-02-10 18:36:26 +01:00
Leonard Lee 44ea4280b2 Fix TIFFTAG_RESOLUTIONUNIT handling.
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>
2013-02-05 17:28:02 +01:00
Sergio Ahumada f377f4960a Update copyright year in Digia's license headers
Change-Id: I82e67b5704007d838d6ab1ee1bc9a870bff7d4c8
Reviewed-by: aavit <eirik.aavitsland@digia.com>
2013-01-02 13:16:31 +01:00
Iikka Eklund 1e036655df Change copyrights from Nokia to Digia
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>
2012-09-23 08:24:41 +02:00
Kent Hansen f68a3dc48d Add TIFF plugin
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>
2012-02-01 13:31:19 +01:00