summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qcolortransfertable_p.h
Commit message (Collapse)AuthorAgeFilesLines
* QColorTransferTable: de-duplicate inverse lookup codeAllan Sandfeld Jensen14 days1-31/+23
| | | | | | | | | As a drive-by, drop the unnecessary floor() and just truncate. These operations are the same for positive numbers, and by the time we reach the code, we have already checked and dealt with negative numbers. Change-Id: I3e99438f11e3a6c7862b8592b7bb4ddda1b33666 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Add CMYK support to QColorSpaceAllan Sandfeld Jensen2024-04-121-1/+1
| | | | | | | | [ChangeLog][QtGui][QColorSpace] Support for CMYK color spaces has been added. Change-Id: I2c684dbeee8b97fc90ca4e2a892349a7fa465d06 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Add color space model, making gray color spaces explicitAllan Sandfeld Jensen2024-04-051-0/+2
| | | | | | | | | This also adds image conversion of both format and color space, which will also be required later for conversions to CMYK formats and color spaces. Change-Id: I578c0a010ffcdb4df4cf9080c0621fac8bc342bf Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Add A2B tables, and PCSLab support to QIccAllan Sandfeld Jensen2024-03-071-12/+21
| | | | | | | | | | | | | This finishes off ICC color space support in Qt (short of the optional multi process elements), and includes necessary parts for potential CMYK support (PCSLab and A2B support) [ChangeLog][QColorSpace] ICC profiles that are not three-component matrix based are now supported. Task-number: QTBUG-108175 Change-Id: Ie29b17a366d9ba0ea8135e1752530d6bb19e7520 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Improve QColorTrc::isLinear and rename it isIdentityAllan Sandfeld Jensen2024-03-051-0/+15
| | | | | | Pick-to: 6.7 Change-Id: Id697fa3844610606c202e3fa717d631a3621e774 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Port from container.count()/length() to size()Marc Mutz2022-10-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is semantic patch using ClangTidyTransformator: auto QtContainerClass = expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o) makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container'. <classes> are: // sequential: "QByteArray", "QList", "QQueue", "QStack", "QString", "QVarLengthArray", "QVector", // associative: "QHash", "QMultiHash", "QMap", "QMultiMap", "QSet", // Qt has no QMultiSet Change-Id: Ibe8837be96e8d30d1846881ecd65180c1bc459af Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Avoid reading outside allocated bufferAllan Sandfeld Jensen2022-06-271-0/+4
| | | | | | | | | Bound the inverse lookup result on the low end as well. Pick-to: 6.4 6.3 6.2 Fixes: QTBUG-104583 Change-Id: Id357fe1c39c88776075d737b08fc2864a2b6e829 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Fix logic problems with table based grayscale ICC profilesAllan Sandfeld Jensen2021-02-251-5/+5
| | | | | | | | | White-point was calculated wrongly and some tables could cause bad behavior in the tables. Pick-to: 6.1 6.0 5.15 Change-Id: I24e8f5f3cc1306f5f898a4acbf7b008e26bd04e2 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Add colorspace transfer functions based on tables of inputsAllan Sandfeld Jensen2020-12-101-22/+20
| | | | | | | | This is the most basic way to represent custom transfer functions. Change-Id: I529fb647ece82c03e85ef77b056d9daf13fe5a61 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Fix a compile error on Android in debug buildsLars Knoll2020-10-091-2/+2
| | | | | | | Android uses -Werror,-Wsign-compare. Change-Id: I4e861ebd6ea00914223358629f8e898c2aa67cd0 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Do not assert on invalid ICC curv tableAllan Sandfeld Jensen2020-10-011-16/+31
| | | | | | | | Reject invalid table data, do not assert it. Pick-to: 5.15 Change-Id: I1fdda4c735bb97bb93ac8f8654ac4cc5fada5389 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Use QList instead of QVector in guiJarek Kobus2020-06-291-9/+7
| | | | | | | | Applied to headers only. Source file to be changed separately. Task-number: QTBUG-84469 Change-Id: Ic08a899321eaffc46b8461aaee3dbaa4d2c727a9 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Long live QColorSpace and friendsAllan Sandfeld Jensen2019-02-081-0/+245
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>