summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Add support for reading monochromatic floating point formatsAllan Sandfeld Jensen2023-05-052-8/+52
| | | | | | | | It seems the builtin converting reader doesn't support all formats. Change-Id: Ia24b4d017476e2dd806861c3e98f3df19dce4584 Fixes: QTBUG-112947 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Highlight third-party modules that are security criticalKai Köhne2023-05-032-0/+6
| | | | | | | | | | | | | | Mark any modules listed as 'processing untrusted content' in https://wiki.qt.io/Third_Party_Code_in_Qt also in the qt_attribution.json files. For reasoning, see also https://lists.qt-project.org/pipermail/development/2023-February/043667.html Pick-to: 6.5 Change-Id: I1fe9b7e9e7f49db86f8289fbd87813ed4049377e Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Add some exclusions for CMake Unity (Jumbo) buildsFriedemann Kleint2023-02-132-0/+4
| | | | | | | | Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: Idcaf2a62fe8811aac757c8d20dca67b9f2ac1a6b Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Remove remains of qmake conversion from CMakeLists.txt filesFriedemann Kleint2023-02-0813-90/+2
| | | | | | Pick-to: 6.5 Change-Id: Ic00df7d45246270d724b3b1d1ef9d13d76dcc136 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix Threads::Threads global target promotion issueAlexandru Croitor2023-01-311-0/+6
| | | | | | | Pick-to: 6.5 Fixes: QTBUG-110720 Change-Id: I064cab7afa662a53fe70938023aa7e994f1b7b84 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Update bundled libtiff to version 4.5.0Eirik Aavitsland2023-01-1767-36220/+41481
| | | | | | | | | | [ChangeLog][Third-Party Code] Bundled libtiff was updated to version 4.5.0 Fixes: QTBUG-109972 Pick-to: 6.5 6.4 6.2 5.15 Change-Id: I2121b68c5a09ca322b3af0f971d710ae392c539c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Update bundled libwebp to version 1.3.0Eirik Aavitsland2023-01-1650-268/+529
| | | | | | | | [ChangeLog][Third-Party Code] Update bundled libwebp to version 1.3.0 Pick-to: 6.5 6.4 6.2 5.15 Change-Id: Ib7645b7348e950bfa27b902de6da879f8309408d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Implement support for file memory mapping for tiff readingEirik Aavitsland2023-01-131-2/+24
| | | | | | | | | | | | | | | | | libtiff will by default attempt to establish a memory map for reading a tiff file. Implement the callbacks to establish this in Qt's tiff handler, since this will save data copying, particularly in the case where the input file is already in memory as a resource or QBuffer. Also, this makes sure that QTiffHandler utilizes libtiff's default, and hence best tested, code path for tiff decoding. Specifically, it avoids a hitting a bug that breaks reading of certain tiffs in the newly released libtiff version 4.5.0. Pick-to: 6.5 6.4 6.2 5.15 Change-Id: Id6a746546e069da9910cacd4a4996c669c72cbab Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* QTiffHandler: fix build with GCC 13's support for FP16Thiago Macieira2023-01-111-1/+1
| | | | | | | | | | | Conversion must be explicit from float. qtiffhandler.cpp:963:30: error: converting to ‘qfloat16::NativeType’ {aka ‘_Float16’} from ‘float’ with greater conversion rank [-Werror] Pick-to: 6.5 Change-Id: Ide4dbd0777a44ed0870efffd17390a0e86f1fd7e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* TGA Plugin: Fix reading of CMapDepthRobert Löhning2023-01-091-3/+12
| | | | | | | | | | | | | | | | | It's specified to be one byte but the old code used to read an int of two bytes. Maybe this wasn't noticed because the following byte often has a value of zero. This fixes oss-fuzz issue 50741 which is an integer overflow resulting from the too large value. [ChangeLog] Fixed reading of TGA files with a non-zero X-origin Pick-to: 6.5 6.4 6.2 5.15 Change-Id: I989bffd0e4e03caf6737e1ce085247ed54e40db0 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Robert Löhning <robert.loehning@qt.io>
* Reject tiled tiffs with corrupt tile size earlyEirik Aavitsland2022-10-071-0/+2
| | | | | | | | | | Work around a shortcoming in libtiff where it spends time discovering the corruption. Fixes: QTBUG-107223 Pick-to: 6.4 6.2 5.15 Change-Id: Ib5da260fe971d0f7d808f7215bf388c443318cb4 Reviewed-by: Robert Löhning <robert.loehning@qt.io>
* Fix bundled libtiff compilation lzw warning and reading failureEirik Aavitsland2022-09-291-0/+1
| | | | | | | | | | | | | | A lacking #include of stdlib.h leads to a compilation warning and runtime reading failure on some platforms. Observed on MSVC2019 in debug mode. Fix by applying commit cbd71793f58c0eda8128f799d415c56e5c64eaa5 in the upstream libtiff repo. Fixes: QTBUG-107040 Pick-to: 6.4 6.2 5.15 Change-Id: Ic76c4627632302423d0e0f8f1b51df342e62b420 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* webp: support sequential input device if full file is availableEirik Aavitsland2022-09-131-15/+14
| | | | | | | | | | | | | | | | | | Since we do no random access during decoding, just a readAll() of the whole image file. So if it is all available already, we can handle a sequential device. That is useful for Quick AnimationImage, which will pass a finished QNetworkReply as the input device. This commit removes some seek() calls in the header checking, that supposedly should reset the device position. These were in practice either no-ops or bugs, since the device is only being peeked, so the position never changes in the first place, and a QImageIOHandler is supposed to read from the device at the position it is at when passed. Fixes: QTBUG-70245 Change-Id: I5a4ff5fa4bbd19b0545ad41645969d714b4dc7d5 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-2515-15/+15
| | | | | | Task-number: QTBUG-105718 Change-Id: I3598499ab89b0e88718eded846306511000e8db9 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Update bundled libwebp to version 1.2.4Eirik Aavitsland2022-08-2252-1570/+2660
| | | | | | | | | [ChangeLog][Third-Party Code] Update bundled libwebp to version 1.2.4 Pick-to: 6.4 6.3 6.2 5.15 Change-Id: Ibd50e3ee67dbe0f7c385224cd9e07df75ea838b9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Doc: Add the Apple OS-based heic and jp2 plugins to the format listEirik Aavitsland2022-08-181-0/+3
| | | | | | | | Those were added earlier, but the doc was not updated. Pick-to: 6.4 Change-Id: I89f762d4172bba77ff4e3d85b80eef3017315358 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add license headers to cmake filesLucie Gérard2022-07-0715-0/+45
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: Ifbf0be4c6f03259f9d084bbef4cf44fa60bf3fde Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Remove redundand LIBRARIES argumentAlexey Edelev2022-07-011-1/+0
| | | | | | | Fixes: QTBUG-104692 Pick-to: 6.2 6.3 6.4 Change-Id: Ia08f10166cfef5998e13cf3fd07029df63712469 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove "Changes in Qt 6" stubKai Köhne2022-06-292-25/+0
| | | | | | | | | The page was just a stub; apparently nothing worthwhile to report changed in Qt ImageFormats for Qt 6. Pick-to: 6.2 6.3 6.4 Change-Id: Ic99ea35005a2fb0d111e345c1e7eac1baf659bea Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* jp2: use new APIs for jasper 3Moody Liu2022-06-211-0/+31
| | | | | | | | | | using new APIs prevents the runtime deprecated warning. also note the memory limit is now set to 500MB Task-number: QTBUG-104398 Pick-to: 6.4 6.3 6.2 5.15 Change-Id: I1b307ec33c6a540a5fb9121214d89a73a509a0d3 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* jp2: use correct buffer_size for jas_stream_memopenMoody Liu2022-06-201-1/+1
| | | | | | | | | | | | According to jasper's documentation, the second argument should be 0 instead of -1, to acquire such a dynamically growing buffer. This also causes a runtime crash due to the signedness of size_t. Fixes: QTBUG-104398 Pick-to: 6.4 6.3 6.2 5.15 Change-Id: I173c6b7c9802c22fe0fa01083a71bf3b6ca7b134 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-1338-1431/+87
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I775d4a0c07b2b82a097d36649203e7f6223fdc51 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Check earlier to avoid sanitzer warningsRobert Loehning2022-06-091-3/+7
| | | | | | | | | Fixes oss-fuzz issue 47689: "load of value 65, which is not a valid value for type 'ICNSEntry::Depth'" Pick-to: 6.4 6.3 6.2 5.15 Change-Id: Ia1b119d863e9518e308117ed1dd6a297297bc537 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Update bundled libtiff to version 4.4.0Eirik Aavitsland2022-05-3132-2823/+5210
| | | | | | | | | | [ChangeLog][Third-Party Code] Bundled libtiff was updated to version 4.4.0 Pick-to: 6.3 6.2 5.15 Fixes: QTBUG-103337 Task-number: QTBUG-103671 Change-Id: I94a26d2d2186e4ea881588a04b0eafae0432be29 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Replace discouraged Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPEAndreas Buhr2022-05-181-1/+1
| | | | | | | | | | | | | Q_MOVABLE_TYPE was conceived before C++ had move semantics. Now, with move semantics, its name is misleading. Q_RELOCATABLE_TYPE was introduced as a synonym to Q_MOVABLE_TYPE. Usage of Q_MOVABLE_TYPE is discouraged now. This patch replaces the last usage of Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPE in qtimageformats. As the two are synonymous, this patch should have no impact on users. Task-number: QTBUG-86829 Change-Id: Ia36e46516445c674fbb4512f82e67c2a6bfabb87 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Add some basic checking against corrupt inputEirik Aavitsland2022-05-161-5/+11
| | | | | | | Fixes: QTBUG-103454 Pick-to: 6.3 6.2 5.15 Change-Id: I169b0de8465bc5d90aebfd8250db0361819065c5 Reviewed-by: Robert Löhning <robert.loehning@qt.io>
* Explicitly include QVarLengthArray headerVolker Hilsheimer2022-03-181-0/+1
| | | | | | | | | | The template is instantiated, but only forward declared after recent cleanup of transitive includes. Pick-to: 6.3 Change-Id: Id43dfe4dc8aa20815ff6b5f64ab307a269ce6c67 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Update bundled libwebp to version 1.2.2Eirik Aavitsland2022-03-0333-150/+340
| | | | | | | | [ChangeLog][Third-Party Code] Update bundled libwebp to version 1.2.2 Pick-to: 6.3 6.2 5.15 Change-Id: I9ddb18c0a8c247799d9e26ea32131c26295d0f4b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix invalid conversion compiler error in mng pluginBiswapriyo Nath2021-10-141-14/+14
| | | | | | | | | | This adds MNG_DECL (i.e. stdcall) attribute to mng related functions. Without this, the i686 MinGW gcc shows this error: invalid conversion from 'void* (*)(mng_size_t)' {aka 'void* (*)(unsigned int)'} to 'mng_memalloc' {aka 'void* (__attribute__((stdcall)) *)(unsigned int)'} [-fpermissive] Change-Id: I5aac8480472f803fa347b26e7d2fa6c7796d72e3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update bundled libwebp to version 1.2.1Eirik Aavitsland2021-08-2061-521/+1140
| | | | | | | | | [ChangeLog][Third-Party Code] Update bundled libwebp to version 1.2.1 Pick-to: 6.2 6.1 5.15 Change-Id: I68082fde6d20d32be87444f471520fb1e8091bf9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* CMake: Use renamed qt6_add_plugin PLUGIN_TYPE optionAlexandru Croitor2021-08-109-9/+9
| | | | | | | Task-number: QTBUG-95170 Pick-to: 6.2 Change-Id: I375fdfe41dcb17846a97ff5ae2dbfa38493360a2 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* CMake: Don't give plugins PUBLIC usage requirements part 2Alexandru Croitor2021-07-153-3/+3
| | | | | | | | | | | | Plugins shouldn't have public usage requirements. Amends dc8debe54474f00d374231ce3d619a8209a2f643 Pick-to: 6.2 Task-number: QTBUG-90819 Change-Id: Ieb10cb885f11ba1e18d0957a93db07bd87dd8aaf Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Don't give plugins PUBLIC usage requirementsJoerg Bornemann2021-07-066-7/+6
| | | | | | | | | | | | | | | | | | | | The pro2cmake.py conversion script faithfully reproduced the .pro files for the plugins, which specified the libraries as public. But in CMake, the implications of this are that public usage requirements should then be propagated to consumers. We don't expect any consumers, since a plugin is created as a MODULE library in CMake, so for Windows we don't even have an import library to link with. The only exception to this is for static builds where plugins are created as STATIC libraries instead, but only in certain controlled situations do we then link to plugins. Even then, usage requirements are not expected to propagate to the consumers, so these relationships should always be specified as private. Pick-to: 6.2 Task-number: QTBUG-90819 Change-Id: I8ec7cf501c13cfc9b107ae38f70cba3536b196e4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove old configure-related filesJoerg Bornemann2021-06-171-183/+0
| | | | | | | | | | | | | Remove the configure.json and configure.pri files that were used for the qmake-based configure. Remove the .prev_*.cmake files that were a by-product of configurejson2cmake.py. Pick-to: 6.2 Task-number: QTBUG-89536 Change-Id: I3a760b05d7e37e34779b0fb721425ceb0998cbfd Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add floating point read and write to TIFF handlerAllan Sandfeld Jensen2021-06-012-14/+113
| | | | | | | | [ChangeLog][TIFF] Read/write support for floating point image formats added. Change-Id: Ib952ef9bfe7e38426f018515a5f92ed56c732a6f Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Update bundled libtiff to version 4.3.0Eirik Aavitsland2021-05-2574-5938/+7677
| | | | | | | | | [ChangeLog][Third-Party Code] Bundled libtiff was updated to version 4.3.0 Pick-to: 6.1 5.15 5.12 Change-Id: I4be8884394db6de7a2aedd4c41abc49a1e565917 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Use correct name of the internal Zlib moduleAlexey Edelev2021-05-221-1/+1
| | | | | | | | Zlib is renamed in Qt to ZlibPrivate according to the internal module naming policy. Change-Id: I7b10cefb49dbf4320c91016a05011978ceee01d2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: Adapt to new WrapZLIB packageAlexandru Croitor2021-04-221-3/+3
| | | | | | Pick-to: 6.1 Change-Id: I9b43b627c834a4eead2f02ee273ccadd92d69fa0 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Fix vendored libwebp to build for universal macOSAlexandru Croitor2021-04-081-4/+13
| | | | | | | | | The 3rdparty NEON libwebp sources need to built for the macOS and iOS arm64 slices when doing a universal build. Task-number: QTBUG-85447 Change-Id: Id55e58027adbea9e3d83e1a4b7309ff36cf01453 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Use checked image allocation on readingEirik Aavitsland2021-03-057-29/+39
| | | | | | | | | | | | Use the imageIO's common QImage creation function that implements QImageReader's allocation limit that was introduced in Qt 6. A few related checks against corrupt image files added as driveby. Pick-to: 6.1 6.0 Change-Id: If5b87cd1b7b2de67ecd023a82ae2168a032fa52e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Avoid scanline overflow when reading corrupt tiffsEirik Aavitsland2021-03-031-0/+4
| | | | | | | | | | | | Check that the actual scanlines to be read by libtiff are not wider than expected. This issue was reported by Samuel Groß and Natalie Silvanovich of Google Project Zero. Pick-to: 6.1 6.0 5.15 5.12 Change-Id: I2af818d5a3c57643747a7fbfac8bb934cd79efd7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Update bundled libwebp to version 1.2.0Eirik Aavitsland2021-03-0139-622/+736
| | | | | | | | [ChangeLog][Third-Party Code] Update bundled libwebp to version 1.2.0 Pick-to: 6.1 6.0 5.15 5.12 Change-Id: Idb95b278c613361d82ea32bd9f591fbe87bfe66f Reviewed-by: Liang Qi <liang.qi@qt.io>
* Update bundled libtiff to version 4.2.0Eirik Aavitsland2021-03-0140-303/+3088
| | | | | | | | [ChangeLog][Third-Party Code] Bundled libtiff was updated to version 4.2.0 Pick-to: 6.1 6.0 5.15 5.12 Change-Id: I376c88638ede59fa4fe316c1468035564218a334 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Avoid oob access when reading certain corrupt tiled tiffsEirik Aavitsland2021-02-241-3/+8
| | | | | | | | | | | | | Add check against corrupt tiffs where libtiff can report conflicting values of tile width, length and byte size. This issue was reported by Samuel Groß and Natalie Silvanovich of Google Project Zero. Pick-to: 6.1 6.0 5.15 5.12 Change-Id: Icb9c20317746190c446c93b474f5c490a805551c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix mng image plugin in cmake buildNiclas Rosenvik2021-02-243-3/+4
| | | | | | | | | | | | | Add cmake/FindLibmng.cmake based on qtbase/cmake/FindLibb2.cmake . Enable mng if found and link to the imported target provided by FindLibmng.cmake so that mng can be used. Libmng 1 did not come with a pkgconfig file and it is still in use so FindLibmng will use the normal cmake procedures if pkgconfig fails to find libmng. Pick-to: 6.1 Change-Id: Iecf4ede700b1bfdab84c98c7333547f0bcecc6b3 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Remove QMake project filesJoerg Bornemann2021-02-1123-597/+0
| | | | | | | | | | This includes removal of the corresponding .prev_CMakeLists.txt files. Pick-to: 6.1 Task-number: QTBUG-88742 Change-Id: I43bd344cd515aa2f671d012c64f281e8fc4793c9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Do not use API deprecated in Qt 6Eirik Aavitsland2021-02-011-1/+1
| | | | | | Pick-to: 6.0 Change-Id: I8dc7a639a8cbabafb309ae298f1a5f9250bf055e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* CMake: Re-generate configure and project filesJoerg Bornemann2020-12-104-5/+324
| | | | | | Pick-to: 6.0 Change-Id: Ifc9d3ee1d856c750556962b0fac8d054fcfee970 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Build docs for imageformats repoAlexandru Croitor2020-11-102-0/+9
| | | | | | | | | | | pro2cmake only generates qt_internal_add_docs() calls for module targets. qtimageformats doesn't have any modules, but still needs documentation. Create a custom interface library target and provide it as the argument for the qt_internal_add_docs() call. Change-Id: I1cf4942f291cff90b7765534a8db7630c2c9cd78 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Rename "Porting" pages to "Changes"Jerome Pasion2020-11-092-3/+3
| | | | | | | | | | | | | | The content in the porting guides are closer to a changelog than a porting guide. At this point, it is easier for maintainers and contributors to write in a changelog than a guide. This change should help with readability and is closer to the usage of "Changes" in documentation. Part of a rename in other submodules. Task-number: QTBUG-87156 Change-Id: Ibc0ef3d39c2d5defb0ef8b1e7f1e9f83cac83a52 Reviewed-by: Paul Wicking <paul.wicking@qt.io>