summaryrefslogtreecommitdiffstats
path: root/src/plugins/imageformats/jp2
Commit message (Collapse)AuthorAgeFilesLines
* Fix allocation limit checking bug in jp2 handlerEirik Aavitsland2023-12-121-1/+2
| | | | | | | | | Checking should be disabled if the limit is set to 0. Fixes: QTBUG-118797 Pick-to: 6.7 6.6 Change-Id: Ie5e01fb3d3b44eae957dbb66237eb7e9d13dc8b6 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Remove remains of qmake conversion from CMakeLists.txt filesFriedemann Kleint2023-02-081-6/+0
| | | | | | Pick-to: 6.5 Change-Id: Ic00df7d45246270d724b3b1d1ef9d13d76dcc136 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-251-1/+1
| | | | | | Task-number: QTBUG-105718 Change-Id: I3598499ab89b0e88718eded846306511000e8db9 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add license headers to cmake filesLucie Gérard2022-07-071-0/+3
| | | | | | | | | | | | 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>
* 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-133-117/+9
| | | | | | | | | | | 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>
* CMake: Use renamed qt6_add_plugin PLUGIN_TYPE optionAlexandru Croitor2021-08-101-1/+1
| | | | | | | 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-151-1/+1
| | | | | | | | | | | | 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>
* Use checked image allocation on readingEirik Aavitsland2021-03-051-11/+7
| | | | | | | | | | | | 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>
* Remove QMake project filesJoerg Bornemann2021-02-112-37/+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>
* CMake: Regenerate projects before API changeAlexandru Croitor2020-09-231-1/+1
| | | | | | | Task-number: QTBUG-86815 Change-Id: Ie06af33cee62d1742fabc4b992e6bc5a68fcc6a1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* fix build on Arch LinuxEvgeniy A. Dushistov2020-08-171-0/+1
| | | | | | | | | | qtimageformats/src/plugins/imageformats/jp2/qjp2handler.cpp:844:41: error: no declaration of «pow» 844 | const double jasperRate = minRate + pow((double(quality) / double(maxQuality)), 2) * maxRate; Pick-to: 5.15 Change-Id: I085996c2db2251903b2a3e52e6e648831637c8f9 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* fix error: comparison of integer expressions of different signednessJonas Karlsson2020-08-131-1/+1
| | | | | Change-Id: Ic90321394120d498343335d1de2e1ee9cdf82ace Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* CMake: Regenerate and fixup qtimageformats projectswip/cmakeAlexandru Croitor2020-03-162-7/+6
| | | | | | | | | | | | | A few changes happened since last update: - CMake target names are now consistent with Qt 5 names - ZLIB handling - TIFF 3rd party handling - Standalone tests simplification - Updates in the SUBDIRS project - Other minor changes Change-Id: I85cca79d38feca44c5b78dae48c79779ae05e288 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2020-03-163-17/+3
|\ | | | | | | | | | | | | Conflicts: dependencies.yaml Change-Id: Ia9a6efda0bea5bc7c5f9f8cd4735da0bd3c0da26
| * Remove overrides of QImageIOHandler::name()v5.15.0-beta2Shawn Rutledge2020-03-032-14/+0
| | | | | | | | | | | | | | | | | | | | Since name() returns format() by default, these haven't been necessary for a long time. We will remove the base class function in Qt 6, so we should remove the overrides and other uses now to ensure that it will be OK. Followup to 7ad0ef0f31afd89509dc2cb3c102b22c0e6c725c. Change-Id: If3b83a36a36747f8e57775053166edd98512e684 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| * Avoid initializing QFlags with 0 or nullptrFriedemann Kleint2019-11-221-3/+3
| | | | | | | | | | | | | | It is being deprecated. Change-Id: I550c7f757567dbcc914e6869c29563b4f3e76a52 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Regenerate projects to be in sync with the scriptAlexandru Croitor2019-11-151-2/+1
| | | | | | | | | | | | Change-Id: I30d599c2f5e74293ff7037b5e667c0a3dab5be87 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Regenerate projects before mergeAlexandru Croitor2019-10-152-5/+6
| | | | | | | | | | Change-Id: I9a889214e310b95ca1418925d6413602f9e00cea Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-08-152-0/+4
|\| | | | | | | Change-Id: Idf48bddde98d108d3692eddb8971affcc691a614
| * Fix compilation with disabled deprecated APIsSona Kurazyan2019-07-082-0/+4
| | | | | | | | | | | | | | | | | | | | The QImageIOHandler::name() has been deprecated since 5.13, but its overrides weren't. Enabled compilation of the overrides only when the QImageIOHandler::name() is compiled. Task-number: QTBUG-76491 Change-Id: I913f03f730969ea88864a5a08afe50c4eac533ca Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Regenerate qtimageformatsAlexandru Croitor2019-06-062-0/+24
| | | | | | | | | | | | | | Ends up adding plugin class names and types. Change-Id: I3824a3a00cf6f56442a0494effcf641e22b3dcc7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Initial CMake PortAlexandru Croitor2019-05-281-0/+21
|/ | | | | | | | | Port 90% of imageformats to be built with CMake. Missing support for mng plugin and documentation. Change-Id: I1d7e4b93c6f8446468f00dbf0663a6a4ec8c9774 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Move qtimageformats over to the new config systemLiang Qi2019-04-021-2/+4
| | | | | | | Task-number: QTBUG-44318 Task-number: QTBUG-62259 Change-Id: Ide5c28015c46b12ee3f21d06badd69db8bed1281 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Remove bundled, unmaintained libjasper source codev5.12.0-beta3Eirik Aavitsland2018-10-152-12/+6
| | | | | | | | | [ChangeLog][Third-Party Code] The unmaintained bundled libjasper has been removed. Building the jp2 handler will require libjasper to be present as a system or external library. Change-Id: Ic48cc6021fc5fb64fb369eb9621fd7a811e8e9f7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove unused former overridersAlexander Volkov2016-12-051-6/+0
| | | | | | | | QImageIOPlugin::keys() was removed in Qt 5.0 by c9d040c1f5b0ee0ddd37e924576ec3bbd990f2ed in qtbase. Change-Id: Ifda96e4764aa82d6f608d9ee2e29bac554603705 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Add missing override and remove redundant virtualAlexander Volkov2016-12-052-10/+10
| | | | | Change-Id: I12f79f8fecdd03e4e6d4ce76e49d3c2d91003676 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-071-4/+4
|\ | | | | | | Change-Id: Iaf805dab2dd057ca756e4034b9f5f55ac8bb097d
| * consistently put {qt,qml}_{module,plugin} at the end of project filesOswald Buddenhagen2016-02-251-4/+4
| | | | | | | | | | | | | | | | this fixes static builds by ensuring that all dependencies are exported. Task-number: QTBUG-51071 Change-Id: I1970c3588d4ef3140adb655c01291e585b4f25b3 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-203-45/+63
|/ | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I6ae2887539c66fa4e1388a9486fe798f2e595434 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Fix null pointer use within Jpeg2000JasperReaderv5.5.1Neil Williams2015-09-091-0/+16
| | | | | | | | | jas_image_create will return null if the image create fails, so the return value must be checked. Task-number: QTBUG-47998 Change-Id: I4cb8a44742ca30d1f0b335b2db2c7f283c968c78 Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
* Fix MSVC warning C4005: 'JAS_WIN_MSVC_BUILD' : macro redefinitionDebao Zhang2015-03-301-3/+0
| | | | | | | | This macro has been defined in the jasper.pri file: msvc: DEFINES += JAS_WIN_MSVC_BUILD Change-Id: I3ac06e4f373c59ded4e3c2ebfa6f50e40a3c83ae Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
* Fix compiler warnings.v5.5.0-alpha1Christian Kandeler2015-02-251-13/+13
| | | | | | | | The jas_image_coord_t is typedef'ed to int_fast32_t, which can be long. Change-Id: I78ed4731d9adf3ea9bd63092edd3f96a185d9c79 Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* Read grayscale JP2000 as grayscaleAllan Sandfeld Jensen2015-02-181-4/+1
| | | | | | | Return a real grayscale qimage instead of an 8-bit indexed qimage. Change-Id: I6f47bfe4268a675f8ce54f9daed10e94feb9e309 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Update copyright headersJani Heikkinen2015-02-113-21/+21
| | | | | | | | | | 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>
* Silence warning about unused parameterv5.4.0-alpha1Thiago Macieira2014-09-031-0/+2
| | | | | | | | | It's only used in debug mode. qjp2handler.cpp:1183:55: warning: unused parameter 'image' [-Wunused-parameter] Change-Id: I0260f21dbee2105f297af0224e25f14a88ee4557 Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* Update license headers and add new licensesJani Heikkinen2014-08-253-54/+30
| | | | | | | | | | - 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>
* Add JPEG 2000 plugin.Jake Petroules2014-02-116-0/+1419
It is moving from Qt Solutions. Change-Id: Ie0dc44d258597f871544fa43238528f42628b799 Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>