summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qicc.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Do not assert on invalid ICC curv tableAllan Sandfeld Jensen2020-10-011-1/+4
| | | | | | | | Reject invalid table data, do not assert it. Pick-to: 5.15 Change-Id: I1fdda4c735bb97bb93ac8f8654ac4cc5fada5389 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* QIcc: fix alignment concerns in ICC profile parsingAndrei Golubev2020-09-151-83/+103
| | | | | | | | | | | Updated QIcc::fromIccProfile() and friends to not rely on QByteArray pointer alignment. Used qFromUnaligned() instead Task-number: QTBUG-84267 Pick-to: 5.15 Change-Id: I69ef7e011707bec27cd84693e7f0e92d79a577d1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Use QList instead of QVector in gui implementationJarek Kobus2020-07-071-1/+1
| | | | | | | Task-number: QTBUG-84469 Change-Id: I366e845249203d80d640355a7780ac2f91a762f1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix deprecation warning, use char16_t instead of quint16/ushortVolker Hilsheimer2020-06-081-2/+2
| | | | | | Change-Id: I4021abb901260c3e27cefd81b3acd5ac198941c8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Add error message on unaligned profile inputsAllan Sandfeld Jensen2020-05-191-0/+5
| | | | | | | Pick-to: 5.15 Task-number: QTBUG-84267 Change-Id: I7ec2100455bd0178cdff0de2d24abbe6c19f812f Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devLiang Qi2020-05-181-1/+2
|\ | | | | | | | | | | | | Conflicts: src/corelib/text/qbytearray.cpp Change-Id: I63706409464d31391012bacdadfd1f6300509787
| * Fix 32bit integer overflow in ICC parsingv5.15.0-rc1Allan Sandfeld Jensen2020-05-041-1/+2
| | | | | | | | | | | | Change-Id: I98c413374374a6143733860aa9bab1a957cd3b2d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Change qHash() to work with size_t instead of uintLars Knoll2020-04-091-1/+1
|/ | | | | | | | | | | This is required, so that QHash and QSet can hold more than 2^32 items on 64 bit platforms. The actual hashing functions for strings are still 32bit, this will be changed in a follow-up commit. Change-Id: I4372125252486075ff3a0b45ecfa818359fe103b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Parse grayscale ICC profilesAllan Sandfeld Jensen2020-02-171-35/+81
| | | | | | | | | Parse them into color profiles, they are a simple subset with just a single TRC and a whitepoint. Change-Id: I300537d488feb3e907a1acff928b2519ffa75088 Fixes: QTBUG-81830 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Remove BT.2020 support from QColorSpaceAllan Sandfeld Jensen2019-09-081-3/+0
| | | | | | | | | | | | BT.2020 is an HDR color space and its luminance range doesn't match that of the rest of the currently available color spaces. Without support for white-point luminance in 5.14, there would be a behavior change when luminance support is later introduced, so it is better to remove it now, and reintroduce it when the necessary handling of different luminance levels is available. Change-Id: Ie29e4dd757faae3ac91d4252e1206acce42801dc Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Simplify QColorSpace named presetsTor Arne Vestbø2019-09-031-4/+3
| | | | | | | | | | | | | | We don't need a getter for the 'preset' of a color-space, as color spaces can be compared to the presets directly. This allows us to remove the Undefined and Unknown values from the presets. Internally we still distinguish known presets from unknown or undefined presets via the magic 0-value. The validity of a QColorSpace is not based on this preset, but on its actual values. Fixes: QTBUG-77963 Change-Id: I1e0a2a4be83021b8c82b3c778019f680fd46455b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Improve our color space terminologyAllan Sandfeld Jensen2019-08-021-12/+12
| | | | | | | | | | | | | | | Replace our use of 'gamut' with 'primaries'. One is the axes of the color space, the other the volume of representable values. For the currently supported color spaces those are mostly equivalent, but when we later add support for scRgb, this would be misleading as it has the same primaries as sRGB but a much wider gamut, and we would like to use the same primaries/"gamut" id for it. Also few people would know what "the sRGB gamut" is, but "the sRGB primaries" is easily googable. Change-Id: I3348ccaae27a071ec77a4356331b9bbbf92e0d19 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Parse color space name from ICC profileAllan Sandfeld Jensen2019-07-311-2/+75
| | | | | | | Adds parsing of ICCv2 and ICCv4 description tags. Change-Id: I8647e1529d4127950624f16c475d8dba610149b6 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Harden ICC parserAllan Sandfeld Jensen2019-07-311-52/+90
| | | | | | | | | | | Add missing implicit size checks of tags by passing the already checked explicitly given size forward. Also adds my fuzzing test for the ICC parser as it is security critical, by being used by multiple image formats. Change-Id: Ieb632ccb78f9b445a276959ffbd66fa04a7a5b45 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Remove public d_func from QColorSpaceAllan Sandfeld Jensen2019-07-231-2/+2
| | | | | | | Replaced with getter in private. Change-Id: I968eb45052a80b45750213cf6a0c08b5973dfc4d Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Long live QColorSpace and friendsAllan Sandfeld Jensen2019-02-081-0/+669
Adds QColorSpace and QColorTransform classes, and parsing of a common subset of ICC profiles found in images, and also parses the ICC profiles in PNG and JPEGs. For backwards compatibility no automatic color handling is done by this patch. [ChangeLog][QtGui] A QColorSpace class has been added, and color spaces are now parsed from PNG and JPEG images. No automatic color space conversion is done however, and applications must request it. Change-Id: Ic09935f84640a716467fa3a9ed1e73c02daf3675 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>