Compare commits
45 Commits
Author | SHA1 | Date | |
---|---|---|---|
bfc73ca260 | |||
f6bb59228e | |||
ee381958b2 | |||
478e49b8a6 | |||
c3daf86079 | |||
a981cefdd2 | |||
723f72930b | |||
99bb24803a | |||
63a9de758f | |||
240e28aac5 | |||
906ecce500 | |||
b2b677b8a5 | |||
bcec942cc9 | |||
66cb8c91d0 | |||
899a2df42d | |||
47920ed63c | |||
274f30e008 | |||
4348a09733 | |||
dd4576a472 | |||
9438540735 | |||
cf78907ff4 | |||
bcb5308545 | |||
c3a91c3bc6 | |||
034b8f331b | |||
ed6a3c520d | |||
bf1c7e8508 | |||
3cb6519dcc | |||
6cbf7529ee | |||
55227815d5 | |||
64d51ed610 | |||
2ca57c9c59 | |||
f7fd14d418 | |||
c9aa1ff629 | |||
91d3bd5227 | |||
bb66367bc8 | |||
14770318a3 | |||
9b1fafe29b | |||
fa673b5df8 | |||
e96b43aef5 | |||
64f3303ef0 | |||
63056c52f9 | |||
2997f7ae8d | |||
0b4741f4b7 | |||
bc52c03981 | |||
c1c57d9a11 |
12
.gitattributes
vendored
@ -1,13 +1 @@
|
||||
autotests/read/raw/RAW_KODAK_C330_FORMAT_NONE_YRGB.raw binary
|
||||
autotests/read/hdr/orientation1.hdr binary
|
||||
autotests/read/hdr/orientation2.hdr binary
|
||||
autotests/read/hdr/orientation3.hdr binary
|
||||
autotests/read/hdr/orientation4.hdr binary
|
||||
autotests/read/hdr/orientation5.hdr binary
|
||||
autotests/read/hdr/orientation6.hdr binary
|
||||
autotests/read/hdr/orientation7.hdr binary
|
||||
autotests/read/hdr/orientation8.hdr binary
|
||||
autotests/read/hdr/fake_earth.hdr binary
|
||||
autotests/read/hdr/rgb.hdr binary
|
||||
autotests/read/hdr/rgb-landscape.hdr binary
|
||||
autotests/read/hdr/rgb-portrait.hdr binary
|
||||
|
@ -2,9 +2,9 @@
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
include:
|
||||
- project: sysadmin/ci-utilities
|
||||
file:
|
||||
- /gitlab-templates/linux-qt6.yml
|
||||
- /gitlab-templates/android-qt6.yml
|
||||
- /gitlab-templates/freebsd-qt6.yml
|
||||
- /gitlab-templates/windows-qt6.yml
|
||||
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux.yml
|
||||
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux-static.yml
|
||||
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/android.yml
|
||||
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/freebsd.yml
|
||||
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/windows.yml
|
||||
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/windows-static.yml
|
||||
|
@ -1,5 +1,5 @@
|
||||
Dependencies:
|
||||
- 'on': ['Linux', 'FreeBSD', 'macOS', 'Windows', 'Android']
|
||||
- 'on': ['Linux', 'FreeBSD', 'macOS', 'Windows']
|
||||
'require':
|
||||
'frameworks/extra-cmake-modules': '@same'
|
||||
'frameworks/karchive' : '@same'
|
||||
|
@ -1,11 +1,9 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
set(KF_VERSION "6.7.0") # handled by release scripts
|
||||
set(KF_DEP_VERSION "6.7.0") # handled by release scripts
|
||||
project(KImageFormats VERSION ${KF_VERSION})
|
||||
project(KImageFormats)
|
||||
|
||||
include(FeatureSummary)
|
||||
find_package(ECM 6.7.0 NO_MODULE)
|
||||
find_package(ECM 5.112.0 NO_MODULE)
|
||||
set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://commits.kde.org/extra-cmake-modules")
|
||||
feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
||||
|
||||
@ -21,11 +19,11 @@ include(ECMDeprecationSettings)
|
||||
include(CheckIncludeFiles)
|
||||
include(FindPkgConfig)
|
||||
|
||||
set(REQUIRED_QT_VERSION 6.5.0)
|
||||
find_package(Qt6Gui ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE)
|
||||
set(REQUIRED_QT_VERSION 5.15.2)
|
||||
find_package(Qt${QT_MAJOR_VERSION}Gui ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE)
|
||||
|
||||
find_package(KF6Archive ${KF_DEP_VERSION})
|
||||
set_package_properties(KF6Archive PROPERTIES
|
||||
find_package(KF5Archive)
|
||||
set_package_properties(KF5Archive PROPERTIES
|
||||
TYPE OPTIONAL
|
||||
PURPOSE "Required for the QImage plugin for Krita and OpenRaster images"
|
||||
)
|
||||
@ -34,12 +32,12 @@ set_package_properties(KF6Archive PROPERTIES
|
||||
# this available in PATH
|
||||
set(BUILD_EPS_PLUGIN FALSE)
|
||||
if (UNIX)
|
||||
find_package(Qt6PrintSupport ${REQUIRED_QT_VERSION} NO_MODULE)
|
||||
set_package_properties(Qt6PrintSupport PROPERTIES
|
||||
find_package(Qt${QT_MAJOR_VERSION}PrintSupport ${REQUIRED_QT_VERSION} NO_MODULE)
|
||||
set_package_properties(Qt${QT_MAJOR_VERSION}PrintSupport PROPERTIES
|
||||
PURPOSE "Required for the QImage plugin for EPS images"
|
||||
TYPE OPTIONAL
|
||||
)
|
||||
if (TARGET Qt6::PrintSupport)
|
||||
if (TARGET Qt${QT_MAJOR_VERSION}::PrintSupport)
|
||||
set(BUILD_EPS_PLUGIN TRUE)
|
||||
endif()
|
||||
endif()
|
||||
@ -75,21 +73,16 @@ if(KIMAGEFORMATS_JXL)
|
||||
endif()
|
||||
add_feature_info(LibJXL LibJXL_FOUND "required for the QImage plugin for JPEG XL images")
|
||||
|
||||
# note: module FindLibRaw missing from https://invent.kde.org/frameworks/extra-cmake-modules
|
||||
find_package(LibRaw 0.20.2)
|
||||
set_package_properties(LibRaw PROPERTIES
|
||||
TYPE OPTIONAL
|
||||
PURPOSE "Required for the QImage plugin for RAW images"
|
||||
)
|
||||
|
||||
option(KIMAGEFORMATS_JXR "Enable plugin for JPEG XR format" OFF)
|
||||
if(KIMAGEFORMATS_JXR)
|
||||
find_package(LibJXR)
|
||||
endif()
|
||||
add_feature_info(LibJXR LibJXR_FOUND "required for the QImage plugin for JPEG XR images")
|
||||
|
||||
ecm_set_disabled_deprecation_versions(
|
||||
QT 6.5
|
||||
KF 5.102
|
||||
QT 5.15.2
|
||||
KF 5.95
|
||||
)
|
||||
|
||||
add_subdirectory(src)
|
||||
@ -98,7 +91,6 @@ if (BUILD_TESTING)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
include(ECMFeatureSummary)
|
||||
ecm_feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
||||
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
||||
|
||||
kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
|
||||
|
@ -1,9 +0,0 @@
|
||||
Copyright (c) <year> <owner>
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
@ -1,11 +0,0 @@
|
||||
Copyright (c) <year> <owner>.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
174
README.md
@ -1,6 +1,6 @@
|
||||
# KImageFormats
|
||||
|
||||
Plugins to allow `QImage` to support extra file formats.
|
||||
Plugins to allow QImage to support extra file formats.
|
||||
|
||||
## Introduction
|
||||
|
||||
@ -16,31 +16,26 @@ The following image formats have read-only support:
|
||||
- Animated Windows cursors (ani)
|
||||
- Camera RAW images (arw, cr2, cr3, dcs, dng, ...)
|
||||
- Gimp (xcf)
|
||||
- Krita (kra)
|
||||
- OpenRaster (ora)
|
||||
- Pixar raster (pxr)
|
||||
- Portable FloatMap (pfm)
|
||||
- OpenEXR (exr)
|
||||
- Photoshop documents (psd, psb, pdd, psdt)
|
||||
- Radiance HDR (hdr)
|
||||
- Sun Raster (im1, im8, im24, im32, ras, sun)
|
||||
- Sun Raster (ras)
|
||||
|
||||
The following image formats have read and write support:
|
||||
|
||||
- AV1 Image File Format (avif)
|
||||
- AV1 Image File Format (AVIF)
|
||||
- Encapsulated PostScript (eps)
|
||||
- High Efficiency Image File Format (heif)
|
||||
- JPEG XL (jxl)
|
||||
- JPEG XR (jxr)
|
||||
- OpenEXR (exr)
|
||||
- Personal Computer Exchange (pcx)
|
||||
- Quite OK Image format (qoi)
|
||||
- SGI images (rgb, rgba, sgi, bw)
|
||||
- Softimage PIC (pic)
|
||||
- Targa (tga): supports more formats than Qt's version
|
||||
- XView (xv)
|
||||
|
||||
## Contributing
|
||||
|
||||
See the [`QImageIOPlugin`](https://doc.qt.io/qt-6/qimageioplugin.html) documentation for information on how to write a
|
||||
See the QImageIOPlugin documentation for information on how to write a
|
||||
new plugin.
|
||||
|
||||
The main difference between this framework and the qimageformats module
|
||||
@ -48,6 +43,10 @@ of Qt is the license. As such, if you write an imageformat plugin and
|
||||
you are willing to sign the Qt Project contributor agreement, it may be
|
||||
better to submit the plugin directly to the Qt Project.
|
||||
|
||||
Note that the imageformat plugins provided by this module also provide a
|
||||
desktop file. This is for the benefit of KImageIO in the KDE4 Support
|
||||
framework.
|
||||
|
||||
## Duplicated Plugins
|
||||
|
||||
The TGA plugin supports more formats than Qt's own TGA plugin;
|
||||
@ -68,156 +67,3 @@ This framework is licensed under the
|
||||
The CMake code in this framework is licensed under the
|
||||
[BSD license](http://opensource.org/licenses/BSD-3-Clause).
|
||||
|
||||
## Plugin status
|
||||
|
||||
The current implementation of a plugin may not be complete or may have limitations
|
||||
of various kinds. Typically the limitations are on maximum size and color depth.
|
||||
|
||||
The various plugins are also limited by the formats natively supported by Qt.
|
||||
For example, native support for CMYK images is only available since Qt 6.8.
|
||||
|
||||
### HDR images
|
||||
|
||||
HDR images are supported via floating point image formats from EXR, HDR, JXR,
|
||||
PFM and PSD plugins.
|
||||
It is important to note that in the past these plugins stripped away HDR
|
||||
information, returning SDR images.
|
||||
|
||||
HDR images return R, G and B values outside the range 0.0 - 1.0.
|
||||
While Qt painters handles HDR data correctly, some older programs may display
|
||||
strange artifacts if they do not use a tone mapping operator (or at least a
|
||||
clamp). This is not a plugin issue.
|
||||
|
||||
### Metadata
|
||||
|
||||
Metadata support is implemented in all formats that support it. In particular,
|
||||
in addition to the classic `"Description"`, `"Author"`, `"Copyright"`, etc... where
|
||||
possible, XMP data is supported via the `"XML:com.adobe.xmp"` key.
|
||||
|
||||
Please note that only the most common metadata is supported.
|
||||
|
||||
### ICC profile support
|
||||
|
||||
ICC support is fully implemented in all formats that support it. When saving,
|
||||
some formats convert the image using color profiles according to
|
||||
specifications. In particular, HDR formats almost always convert to linear
|
||||
RGB.
|
||||
|
||||
### Maximum image size
|
||||
|
||||
Where possible, plugins support large images. By convention, many of the
|
||||
large image plugins are limited to a maximum of 300,000 x 300,000 pixels.
|
||||
Anyway, all plugins are also limited by the
|
||||
`QImageIOReader::allocationLimit()`. Below are the maximum sizes for each
|
||||
plugin ('n/a' means no limit, i.e. the limit depends on the format encoding).
|
||||
|
||||
- ANI: n/a
|
||||
- AVIF: 32,768 x 32,768 pixels, in any case no larger than 256 megapixels
|
||||
- EXR: 300,000 x 300,000 pixels
|
||||
- HDR: n/a (large image)
|
||||
- HEIF: n/a
|
||||
- JXL: 65,535 x 65,535 pixels, in any case no larger than 256 megapixels
|
||||
- JXR: n/a
|
||||
- PCX: 65,535 x 65,535 pixels
|
||||
- PFM: n/a (large image)
|
||||
- PIC: 65,535 x 65,535 pixels
|
||||
- PSD: 300,000 x 300,000 pixels
|
||||
- PXR: 65,535 x 65,535 pixels
|
||||
- QOI: 300,000 x 300,000 pixels
|
||||
- RAS: n/a (large image)
|
||||
- RAW: n/a (depends on the RAW format loaded)
|
||||
- RGB: 65,535 x 65,535 pixels
|
||||
- TGA: 65,535 x 65,535 pixels
|
||||
- XCF: 300,000 x 300,000 pixels
|
||||
|
||||
### Sequential and random access devices
|
||||
|
||||
All plugins work fine on random access devices while only some work on
|
||||
sequential access devices.
|
||||
Some plugins, such as PSD, allow reading RGB images on sequential access
|
||||
devices, but cannot do the same for Lab files.
|
||||
|
||||
**Important: some plugins use `QIODevice` transactions and/or
|
||||
`QIODevice::ungetChar()`. Therefore, the device used to read the image must not
|
||||
have any active transactions.**
|
||||
|
||||
### Memory usage
|
||||
|
||||
Qt has added many image formats over time. In older plugins, to support new
|
||||
formats, `QImage` conversion functions have been used, causing memory
|
||||
consumption proportional to the size of the image to be saved.
|
||||
Normally this is not a source of problems because the affected plugins
|
||||
are limited to maximum images of 2GiB or less.
|
||||
|
||||
On plugins for formats that support large images, progressive conversion has
|
||||
been used or the maximum size of the image that can be saved has been limited.
|
||||
|
||||
### Non-RGB formats
|
||||
|
||||
PSD plugin loads CMYK, Lab and Multichannel images and converts them to RGB
|
||||
without using the ICC profile.
|
||||
|
||||
JXR and PSD plugins natively support 4-channel CMYK images when compiled
|
||||
with Qt 6.8+.
|
||||
|
||||
### The HEIF plugin
|
||||
|
||||
**This plugin is disabled by default. It can be enabled with the
|
||||
`KIMAGEFORMATS_HEIF` build option in the cmake file.**
|
||||
|
||||
### The EXR plugin
|
||||
|
||||
The following defines can be defined in cmake to modify the behavior of the plugin:
|
||||
- `EXR_CONVERT_TO_SRGB`: the linear data is converted to sRGB on read to accommodate programs that do not support color profiles.
|
||||
- `EXR_DISABLE_XMP_ATTRIBUTE`: disables the stores XMP values in a non-standard attribute named "xmp". Note that Gimp reads the "xmp" attribute and Darktable writes it as well.
|
||||
|
||||
### The HDR plugin
|
||||
|
||||
The following defines can be defined in cmake to modify the behavior of the plugin:
|
||||
- `HDR_HALF_QUALITY`: on read, a 16-bit float image is returned instead of a 32-bit float one.
|
||||
|
||||
### The JXL plugin
|
||||
|
||||
**The current version of the plugin limits the image size to 256 megapixels
|
||||
according to feature level 5 of the JXL stream encoding.**
|
||||
|
||||
### The JXR plugin
|
||||
|
||||
**This plugin is disabled by default. It can be enabled with the
|
||||
`KIMAGEFORMATS_JXR` build option in the cmake file.**
|
||||
|
||||
The following defines can be defined in cmake to modify the behavior of the plugin:
|
||||
- `JXR_DENY_FLOAT_IMAGE`: disables the use of float images and consequently any HDR data will be lost.
|
||||
- `JXR_DISABLE_DEPTH_CONVERSION`: remove the neeeds of additional memory by disabling the conversion between different color depths (e.g. RGBA64bpp to RGBA32bpp) at the cost of reduced compatibility.
|
||||
- `JXR_DISABLE_BGRA_HACK`: Windows displays and opens JXR files correctly out of the box. Unfortunately it doesn't seem to open (P)RGBA @32bpp files as it only wants (P)BGRA32bpp files (a format not supported by Qt). Only for this format an hack is activated to guarantee total compatibility of the plugin with Windows.
|
||||
- `JXR_ENABLE_ADVANCED_METADATA`: enable metadata support (e.g. XMP). Some distributions use an incomplete JXR library that does not allow reading metadata, causing compilation errors.
|
||||
|
||||
### The PSD plugin
|
||||
|
||||
PSD support has the following limitations:
|
||||
- Only images saved by Photoshop using compatibility mode enabled (Photoshop default) can be decoded.
|
||||
- Multichannel images are treated as CMY/CMYK and are only loaded if they have 3 or more channels.
|
||||
- Duotone images are treated as grayscale images.
|
||||
- Extra channels other than alpha are discarded.
|
||||
|
||||
The following defines can be defined in cmake to modify the behavior of the plugin:
|
||||
- `PSD_FAST_LAB_CONVERSION`: the LAB image is converted to linear sRGB instead of sRGB which significantly increases performance.
|
||||
- `PSD_NATIVE_CMYK_SUPPORT_DISABLED`: disable native support for CMYK images when compiled with Qt 6.8+
|
||||
|
||||
### The RAW plugin
|
||||
|
||||
Loading RAW images always requires a conversion. To allow the user to
|
||||
choose how to convert the image, it was chosen to use the quality parameter
|
||||
to act on the converter. The quality parameter can be used with values from
|
||||
0 to 100 (0 = fast, 100 = maximum quality) or by setting flags to
|
||||
selectively change the conversion (see also [raw_p.h](./src/imageformats/raw_p.h)).
|
||||
|
||||
The default setting tries to balance quality and conversion speed.
|
||||
|
||||
### The XCF plugin
|
||||
|
||||
XCF support has the following limitations:
|
||||
- XCF format up to [version 12](https://testing.developer.gimp.org/core/standards/xcf/#version-history) (no support for GIMP 3).
|
||||
- The returned image is always 8-bit.
|
||||
- Cannot read zlib compressed files.
|
||||
- The rendered image may be slightly different (colors/transparencies) than in GIMP.
|
||||
|
@ -1,3 +1,5 @@
|
||||
#find_package(Qt5Test ${REQUIRED_QT_VERSION} NO_MODULE)
|
||||
|
||||
include(ECMMarkAsTest)
|
||||
|
||||
add_definitions(-DPLUGIN_DIR="${CMAKE_CURRENT_BINARY_DIR}/../bin")
|
||||
@ -11,8 +13,8 @@ macro(kimageformats_read_tests)
|
||||
endif()
|
||||
|
||||
if (NOT TARGET readtest)
|
||||
add_executable(readtest readtest.cpp templateimage.cpp)
|
||||
target_link_libraries(readtest Qt6::Gui)
|
||||
add_executable(readtest readtest.cpp)
|
||||
target_link_libraries(readtest Qt${QT_MAJOR_VERSION}::Gui)
|
||||
target_compile_definitions(readtest
|
||||
PRIVATE IMAGEDIR="${CMAKE_CURRENT_SOURCE_DIR}/read")
|
||||
ecm_mark_as_test(readtest)
|
||||
@ -35,7 +37,7 @@ macro(kimageformats_write_tests)
|
||||
|
||||
if (NOT TARGET writetest)
|
||||
add_executable(writetest writetest.cpp)
|
||||
target_link_libraries(writetest Qt6::Gui)
|
||||
target_link_libraries(writetest Qt${QT_MAJOR_VERSION}::Gui)
|
||||
target_compile_definitions(writetest
|
||||
PRIVATE IMAGEDIR="${CMAKE_CURRENT_SOURCE_DIR}/write")
|
||||
ecm_mark_as_test(writetest)
|
||||
@ -66,16 +68,14 @@ endmacro()
|
||||
kimageformats_read_tests(
|
||||
hdr
|
||||
pcx
|
||||
pfm
|
||||
psd
|
||||
pxr
|
||||
qoi
|
||||
ras
|
||||
rgb
|
||||
tga
|
||||
)
|
||||
|
||||
if (KF6Archive_FOUND)
|
||||
if (KF5Archive_FOUND)
|
||||
kimageformats_read_tests(
|
||||
kra
|
||||
ora
|
||||
@ -99,12 +99,6 @@ if (LibHeif_FOUND)
|
||||
kimageformats_write_tests(FUZZ 1
|
||||
heif-nodatacheck-lossless
|
||||
)
|
||||
|
||||
if (LibHeif_VERSION VERSION_GREATER_EQUAL "1.17.0")
|
||||
kimageformats_read_tests(FUZZ 1
|
||||
hej2
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (LibJXL_FOUND AND LibJXLThreads_FOUND)
|
||||
@ -116,15 +110,6 @@ if (LibJXL_FOUND AND LibJXLThreads_FOUND)
|
||||
)
|
||||
endif()
|
||||
|
||||
if (LibJXR_FOUND)
|
||||
kimageformats_read_tests(
|
||||
jxr
|
||||
)
|
||||
kimageformats_write_tests(
|
||||
jxr-nodatacheck
|
||||
)
|
||||
endif()
|
||||
|
||||
# Allow some fuzziness when reading this formats, to allow for
|
||||
# rounding errors (eg: in alpha blending).
|
||||
kimageformats_read_tests(FUZZ 1
|
||||
@ -155,11 +140,6 @@ if (OpenEXR_FOUND)
|
||||
kimageformats_read_tests(
|
||||
exr
|
||||
)
|
||||
# Color space conversions from sRGB to linear on saving and
|
||||
# from linear to sRGB on loading result in some rounding errors.
|
||||
kimageformats_write_tests(FUZZ 5
|
||||
exr-nodatacheck-lossless
|
||||
)
|
||||
endif()
|
||||
|
||||
if (LibRaw_FOUND)
|
||||
@ -168,19 +148,19 @@ if (LibRaw_FOUND)
|
||||
)
|
||||
endif()
|
||||
|
||||
find_package(Qt6Test ${REQUIRED_QT_VERSION} CONFIG QUIET)
|
||||
find_package(Qt${QT_MAJOR_VERSION}Test ${REQUIRED_QT_VERSION} CONFIG QUIET)
|
||||
|
||||
if(NOT TARGET Qt6::Test)
|
||||
message(STATUS "Qt6Test not found, some autotests will not be built.")
|
||||
if(NOT TARGET Qt${QT_MAJOR_VERSION}::Test)
|
||||
message(STATUS "Qt${QT_MAJOR_VERSION}Test not found, some autotests will not be built.")
|
||||
return()
|
||||
endif()
|
||||
|
||||
add_executable(pictest pictest.cpp)
|
||||
target_link_libraries(pictest Qt6::Gui Qt6::Test)
|
||||
target_link_libraries(pictest Qt${QT_MAJOR_VERSION}::Gui Qt${QT_MAJOR_VERSION}::Test)
|
||||
ecm_mark_as_test(pictest)
|
||||
add_test(NAME kimageformats-pic COMMAND pictest)
|
||||
|
||||
add_executable(anitest anitest.cpp)
|
||||
target_link_libraries(anitest Qt6::Gui Qt6::Test)
|
||||
target_link_libraries(anitest Qt${QT_MAJOR_VERSION}::Gui Qt${QT_MAJOR_VERSION}::Test)
|
||||
ecm_mark_as_test(anitest)
|
||||
add_test(NAME kimageformats-ani COMMAND anitest)
|
||||
|
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.7 KiB |
@ -1,5 +0,0 @@
|
||||
[
|
||||
{
|
||||
"fileName" : "orientation_all.png"
|
||||
}
|
||||
]
|
@ -1,5 +0,0 @@
|
||||
[
|
||||
{
|
||||
"fileName" : "orientation_all.png"
|
||||
}
|
||||
]
|
@ -1,5 +0,0 @@
|
||||
[
|
||||
{
|
||||
"fileName" : "orientation_all.png"
|
||||
}
|
||||
]
|
@ -1,5 +0,0 @@
|
||||
[
|
||||
{
|
||||
"fileName" : "orientation_all.png"
|
||||
}
|
||||
]
|
@ -1,5 +0,0 @@
|
||||
[
|
||||
{
|
||||
"fileName" : "orientation_all.png"
|
||||
}
|
||||
]
|
@ -1,5 +0,0 @@
|
||||
[
|
||||
{
|
||||
"fileName" : "orientation_all.png"
|
||||
}
|
||||
]
|
@ -1,5 +0,0 @@
|
||||
[
|
||||
{
|
||||
"fileName" : "orientation_all.png"
|
||||
}
|
||||
]
|
@ -1,5 +0,0 @@
|
||||
[
|
||||
{
|
||||
"fileName" : "orientation_all.png"
|
||||
}
|
||||
]
|
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 16 KiB |
@ -1,19 +0,0 @@
|
||||
[
|
||||
{
|
||||
"minQtVersion" : "6.5.7",
|
||||
"maxQtVersion" : "6.5.99",
|
||||
"disableAutoTransform": true,
|
||||
"fileName" : "orientation6_notranfs.png",
|
||||
"comment" : "Test with automatic transformation disabled."
|
||||
},
|
||||
{
|
||||
"minQtVersion" : "6.7.3",
|
||||
"disableAutoTransform": true,
|
||||
"fileName" : "orientation6_notranfs.png",
|
||||
"comment" : "Test with automatic transformation disabled."
|
||||
},
|
||||
{
|
||||
"unsupportedFormat" : true,
|
||||
"comment" : "It is not possible to disable the transformation with the current version of the plugin."
|
||||
}
|
||||
]
|
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 206 KiB |
Before Width: | Height: | Size: 16 KiB |
@ -1,11 +0,0 @@
|
||||
[
|
||||
{
|
||||
"minQtVersion" : "6.8.0",
|
||||
"fileName" : "testcard_cmyk8.tif"
|
||||
},
|
||||
{
|
||||
"maxQtVersion" : "6.7.99",
|
||||
"unsupportedFormat" : true,
|
||||
"comment" : "Qt versions lower than 6.8 do not support CMYK format so this test should be skipped."
|
||||
}
|
||||
]
|
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 593 B |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 26 KiB |
@ -1,11 +0,0 @@
|
||||
[
|
||||
{
|
||||
"minQtVersion" : "6.8.0",
|
||||
"fileName" : "cmyk16_testcard_qt6_8.tif"
|
||||
},
|
||||
{
|
||||
"minQtVersion" : "6.0.0",
|
||||
"maxQtVersion" : "6.7.99",
|
||||
"fileName" : "cmyk16_testcard.png"
|
||||
}
|
||||
]
|
Before Width: | Height: | Size: 13 KiB |
@ -1,11 +0,0 @@
|
||||
[
|
||||
{
|
||||
"minQtVersion" : "6.8.0",
|
||||
"fileName" : "cmyk8_testcard_qt6_8.tif"
|
||||
},
|
||||
{
|
||||
"minQtVersion" : "6.0.0",
|
||||
"maxQtVersion" : "6.7.99",
|
||||
"fileName" : "cmyk8_testcard.png"
|
||||
}
|
||||
]
|
@ -1,11 +0,0 @@
|
||||
[
|
||||
{
|
||||
"minQtVersion" : "6.8.0",
|
||||
"fileName" : "cmyka-16bits_qt6_8.png"
|
||||
},
|
||||
{
|
||||
"minQtVersion" : "6.0.0",
|
||||
"maxQtVersion" : "6.7.99",
|
||||
"fileName" : "cmyka-16bits.png"
|
||||
}
|
||||
]
|
Before Width: | Height: | Size: 111 KiB |
@ -1,11 +0,0 @@
|
||||
[
|
||||
{
|
||||
"minQtVersion" : "6.8.0",
|
||||
"fileName" : "cmyka-8bits_qt6_8.png"
|
||||
},
|
||||
{
|
||||
"minQtVersion" : "6.0.0",
|
||||
"maxQtVersion" : "6.7.99",
|
||||
"fileName" : "cmyka-8bits.png"
|
||||
}
|
||||
]
|
Before Width: | Height: | Size: 77 KiB |
Before Width: | Height: | Size: 189 KiB After Width: | Height: | Size: 189 KiB |
@ -1,11 +0,0 @@
|
||||
[
|
||||
{
|
||||
"minQtVersion" : "6.8.0",
|
||||
"fileName" : "mch-16bits_qt_6_8.tif"
|
||||
},
|
||||
{
|
||||
"minQtVersion" : "6.0.0",
|
||||
"maxQtVersion" : "6.7.99",
|
||||
"fileName" : "mch-16bits.png"
|
||||
}
|
||||
]
|
@ -1,11 +0,0 @@
|
||||
[
|
||||
{
|
||||
"minQtVersion" : "6.8.0",
|
||||
"fileName" : "mch-8bits_qt_6.8.tif"
|
||||
},
|
||||
{
|
||||
"minQtVersion" : "6.0.0",
|
||||
"maxQtVersion" : "6.7.99",
|
||||
"fileName" : "mch-8bits.png"
|
||||
}
|
||||
]
|
Before Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 192 B |
Before Width: | Height: | Size: 470 B |
Before Width: | Height: | Size: 338 B |
Before Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 21 KiB |