Compare commits
434 Commits
v5.89.0
...
v6.20.0-rc
| Author | SHA1 | Date | |
|---|---|---|---|
| ffcfa49f13 | |||
| d3d4bea2f1 | |||
| cfbeb397a8 | |||
| 1c6ce2437e | |||
| 3d9f1c4e9e | |||
| e7d01c286f | |||
| dfda863841 | |||
| 3d4d74fc02 | |||
| 326e56029a | |||
| e8e5b091bc | |||
| aeb2988eec | |||
| abfda2ce69 | |||
| d6d67c7b8b | |||
| 54c94764d1 | |||
| 7512874620 | |||
| 146f637385 | |||
| 436310b4f0 | |||
| d8a8bcb68e | |||
| 2b80a0a55a | |||
| 8e164474b4 | |||
| 4c52480b73 | |||
| 19faa55a6d | |||
| b9bfeedbc1 | |||
| 3c8539d53d | |||
| d332ad717b | |||
| 1ca7baed98 | |||
| f1b0c9f0ec | |||
| b83f4c0231 | |||
| a457e5ddcb | |||
| f28cd98661 | |||
| 05c3a1afe6 | |||
| fda751c641 | |||
| a4e18734bd | |||
| 14286a6ab0 | |||
| 945fd6f0ce | |||
| c36b4e2350 | |||
| 95f0d15e14 | |||
| 56c8bc7323 | |||
| 08e178f098 | |||
| 6881e3111b | |||
| 463da81fad | |||
| 8036b1d032 | |||
| 71cc137254 | |||
| 7858c4eeec | |||
| eae41980b2 | |||
| 3bf2281610 | |||
| 59089855fa | |||
| 5a067130af | |||
| 9c6c0c01ae | |||
| f933cbe12d | |||
| ebc366b3c5 | |||
| bc8b5b56b1 | |||
| 35a1ed0227 | |||
| f63b082c85 | |||
| 68cc915132 | |||
| e912a4ac9b | |||
| 480ea8dba0 | |||
| 37e3c65a05 | |||
| 4b44f8474f | |||
| c2a1d4b401 | |||
| cd39c36621 | |||
| 1bfae6f171 | |||
| fd864e6f55 | |||
| 16b669d63d | |||
| 457f3afa24 | |||
| 080fd3c72d | |||
| 1d69f6af57 | |||
| 083680eb77 | |||
| 0a9f9fe106 | |||
| 21b3b890ec | |||
| aef4bd7e1c | |||
| ea1983a7d1 | |||
| 775b53f1f6 | |||
| 02cf1502c0 | |||
| f6c718a789 | |||
| 4f2f2425d3 | |||
| e6357c22f7 | |||
| 094177a01c | |||
| 7420f47c17 | |||
| 888bca7387 | |||
| e3aefd2aa1 | |||
| aa8134ee0d | |||
| 9f09473aa0 | |||
| 62eb1d28cb | |||
| 15bece40ec | |||
| 1b3d2afbe3 | |||
| 850068c1dc | |||
| 6bf38ea638 | |||
| 2adca7c0ca | |||
| dd69fdaea9 | |||
| ae62ea3dfc | |||
| 9c47845f15 | |||
| 7c7fa73020 | |||
| 92e4271e84 | |||
| 6f588c6fd3 | |||
| a182478e2c | |||
| 4026f41890 | |||
| bef2b9168f | |||
| 473f5d9847 | |||
| 9bee29cc01 | |||
| cdf3be3af1 | |||
| 752b18a42c | |||
| 97a1ea181c | |||
| 64a43fb04f | |||
| 6821c29819 | |||
| e4d95c03fa | |||
| afa8ed1a5d | |||
| 245c835d92 | |||
| b2663d2651 | |||
| 35ab37c628 | |||
| b28baa4a1e | |||
| 5d2540c135 | |||
| 25cc8bc262 | |||
| 7742537f8c | |||
| d3386bbf50 | |||
| e77986c7e0 | |||
| c0261f4926 | |||
| e5cf9caac5 | |||
| 90d4256f3d | |||
| bb1c6aab9e | |||
| 74a734efed | |||
| e9fa4b6610 | |||
| 36a6ef7d78 | |||
| 9fd6896cec | |||
| 9b14e752db | |||
| 90a2e3b412 | |||
| b28cf4c352 | |||
| b536ec4a5e | |||
| 7d7b295ac2 | |||
| 397957a976 | |||
| 18a729f7a1 | |||
| 7a74b50d64 | |||
| 0a06a07fa4 | |||
| e89408b426 | |||
| 8a05711e99 | |||
| d6534f0e68 | |||
| f608441b03 | |||
| 49060026b7 | |||
| 424e7a75de | |||
| be534ea06e | |||
| baaf1093a1 | |||
| e83458a5d8 | |||
| 873ec1bb5f | |||
| 287a447095 | |||
| ebb9c1ec18 | |||
| ac3591c7ea | |||
| a89367dde6 | |||
| 65a587afad | |||
| 5f92bcbf26 | |||
| ae00c110f2 | |||
| f39ca9dc9b | |||
| f296c38daf | |||
| bda8487147 | |||
| bb10c4bd5c | |||
| 1982557a55 | |||
| c97ee00f5e | |||
| e6a0f8758b | |||
| 5c0c7e4fd7 | |||
| 40c2aae0cd | |||
| f49704b2df | |||
| 43f3fd05f7 | |||
| a7cf1a87f9 | |||
| fe28130cb3 | |||
| c0d5b8854b | |||
| 0b2c6d725d | |||
| 894524f7e4 | |||
| 348ddce987 | |||
| 1cb294545f | |||
| b649cca304 | |||
| adc5c7ae9a | |||
| a6f7482957 | |||
| d91c7dd912 | |||
| 86865223d2 | |||
| ecbcf3b7f4 | |||
| 87eff569a4 | |||
| a531978e2a | |||
| ceb1c46fea | |||
| 6558b3255a | |||
| 374961dab4 | |||
| b5d8b6638e | |||
| 92a1752c1f | |||
| 9f05ecb523 | |||
| 28c4ceeba9 | |||
| f029a4a8ed | |||
| 56f229a2f1 | |||
| 72d4c41415 | |||
| 4923e2ecaa | |||
| b645c9c258 | |||
| 8265b3602b | |||
| dbd439bd98 | |||
| a664baa9f9 | |||
| c38a1a0248 | |||
| 2ea724c241 | |||
| ecfbff8197 | |||
| 4dedd88c08 | |||
| d233e80dbb | |||
| 799ac37660 | |||
| 0378bd67e1 | |||
| 7d696a81d2 | |||
| b5d5abe0ea | |||
| 3f4690d1e9 | |||
| ac1006cc66 | |||
| 97120b2537 | |||
| fee0165bef | |||
| ae641f7e94 | |||
| 46f7b90ce6 | |||
| f7c8eaa140 | |||
| 36bfee8ae3 | |||
| e2aaf89ec5 | |||
| 989a5c70d6 | |||
| 8588c053b6 | |||
| 145dedf360 | |||
| 2405a09e36 | |||
| d02dcb064b | |||
| 0590c6b49d | |||
| eb46f0f421 | |||
| 8c23e74ef6 | |||
| 219d9cb2c2 | |||
| 51921e8ee5 | |||
| 23e9fec869 | |||
| 4478bc8d2b | |||
| acd6b3970c | |||
| 638fdfcbdd | |||
| a497ab789b | |||
| 3590a43fc5 | |||
| f5a6de7280 | |||
| 4c0f49295b | |||
| e9da5edb9a | |||
| e10f5aa9a5 | |||
| 14020a23d5 | |||
| bb17f7bf84 | |||
| b849e48ef4 | |||
| 81b7263d73 | |||
| 63e21ee5f3 | |||
| 06f097046c | |||
| 950ed43623 | |||
| 863c424390 | |||
| bd083ff354 | |||
| 99663607b2 | |||
| 7499e3b8d4 | |||
| cb5ca7fc48 | |||
| 4f61e3912c | |||
| b8a9c75c80 | |||
| 4995c9cd15 | |||
| a54c5e876c | |||
| 6c1a7ad339 | |||
| c721fa481b | |||
| ea15fed399 | |||
| c2fabef501 | |||
| 5b2c190823 | |||
| 1b94554323 | |||
| c2c12b1d7e | |||
| c169296fbf | |||
| 29aec82e67 | |||
| 95ee381195 | |||
| 8e5951471d | |||
| 0710bc65f6 | |||
| 4be09ba419 | |||
| 6cbdf9cf54 | |||
| 7d6de20e8c | |||
| b37c991e39 | |||
| 249046f25d | |||
| 9f7b1b8dee | |||
| f065104b72 | |||
| f34185197a | |||
| 9f24023ca7 | |||
| 8d1ef536be | |||
| da8ed31aec | |||
| ce8383e5fd | |||
| db0adee62f | |||
| 91a342e90d | |||
| 7864ad4bc6 | |||
| 524711f633 | |||
| b8b980f400 | |||
| d932e0d16b | |||
| 18ea0492bc | |||
| 7899c27a80 | |||
| 6a51407556 | |||
| 75e1280073 | |||
| 0a6fbd88e9 | |||
| fbf60f8bbb | |||
| 2799382c21 | |||
| adc7da4f41 | |||
| ac808679cd | |||
| 2aea982e9e | |||
| 9173f02ea3 | |||
| 4badb3088e | |||
| 8dc685df26 | |||
| 4bd9d5baec | |||
| 79e8e183eb | |||
| 7d63a1d8fa | |||
| c11c5eff4f | |||
| c02bf3dbcc | |||
| 6254529d2d | |||
| 35ff3efbbc | |||
| 7a0d95af92 | |||
| 4c3ade04dd | |||
| b209e54b6f | |||
| 4dc2099fa4 | |||
| 491b223c15 | |||
| 6559bf8994 | |||
| 34ed3bad27 | |||
| 9c579fc1f8 | |||
| 93adb22632 | |||
| d57ff91f8b | |||
| edd6adcbac | |||
| d787c12727 | |||
| c9fec5e408 | |||
| e60dfd4968 | |||
| f5a9dd46d2 | |||
| 41f0411b62 | |||
| e1a3751936 | |||
| 402dfb5de3 | |||
| a3f7c03b61 | |||
| 20cec27ae8 | |||
| d34c1668aa | |||
| 560d0483ae | |||
| 085c9c4841 | |||
| b654f20ece | |||
| 21211cd63b | |||
| 5cc7a2b45c | |||
| 4451737d2f | |||
| 01ab0876f1 | |||
| a67dcac7d1 | |||
| cef8d08ad4 | |||
| a4b9dd9400 | |||
| 6e6c1ab5f4 | |||
| f205adf2e0 | |||
| 14742cb502 | |||
| 4c6d2b92b6 | |||
| 05bd9397b3 | |||
| f4ca3f6783 | |||
| a30f043e5d | |||
| 7af4eea253 | |||
| a3049f6740 | |||
| 3b1e8f7054 | |||
| dcab3a06ab | |||
| 361f9e867e | |||
| 35883aa604 | |||
| 50846f224f | |||
| 9ad82ed608 | |||
| c9f32a226f | |||
| a0df142408 | |||
| 8586bb4719 | |||
| d734f28727 | |||
| afa7399b36 | |||
| bfb12093ad | |||
| 1190e53e9b | |||
| 350ce1b990 | |||
| bcbf45e23a | |||
| c71a7984d6 | |||
| b1f3a87896 | |||
| 8af9a0f9d9 | |||
| 3790a89cd1 | |||
| f475a4b24a | |||
| d2f38b8b9c | |||
| 9ab64dbf22 | |||
| 20f74ce5e6 | |||
| 54129819d5 | |||
| 181eb253c6 | |||
| c5f7ea7eac | |||
| ea14882ff7 | |||
| f8bfdce285 | |||
| 524f083ee4 | |||
| c96ad6ba8a | |||
| 49bd131eef | |||
| 2a25ec7a56 | |||
| a8a477ae67 | |||
| 2f27dff48b | |||
| 72a1cc23b1 | |||
| 6f3a326cf8 | |||
| d881a7bbb1 | |||
| 65a20b43fc | |||
| 84941b7690 | |||
| 21928300c6 | |||
| 024d199ed0 | |||
| 9ac923ad09 | |||
| feb6d9b20f | |||
| dfbc6e0f8c | |||
| 43543f96bc | |||
| 62e477a6f2 | |||
| e6955e1f03 | |||
| 6074c4d6fd | |||
| 6f44c5c52a | |||
| d030c75925 | |||
| 9b3133ac92 | |||
| b0a0bb1294 | |||
| 3d5090593c | |||
| d4966d169b | |||
| bf52896347 | |||
| c52ffa2227 | |||
| e4e386babf | |||
| b47a9d7022 | |||
| 2cbf815d1f | |||
| 6cd0056f3b | |||
| 83374f390e | |||
| 5e59d950bd | |||
| de320447f6 | |||
| cf375a207f | |||
| 2aec1d3926 | |||
| 2a84dd677d | |||
| ebcc34519c | |||
| cff2604cf9 | |||
| f8a251e268 | |||
| 52134fc2e9 | |||
| 343954ca98 | |||
| 44fd6b7bc0 | |||
| c8a0806aab | |||
| bb475dedd1 | |||
| 9e28aae868 | |||
| 5c47a97b79 | |||
| 84d56d00cf | |||
| 384f78a13c | |||
| 72fc32aefc | |||
| 98f19c60ae | |||
| ae6b724824 | |||
| 3e751dd80d | |||
| e69dff73e6 | |||
| 64cfe52bee | |||
| 8732fc8487 | |||
| d9729b7190 | |||
| 55d3c568b2 | |||
| 4afafee6c1 | |||
| f04084e175 | |||
| 9911c9c2ea | |||
| 4ceef5164d | |||
| 3d2d91a08a | |||
| 0a02458560 | |||
| 96836e849f | |||
| f4edb7296f | |||
| 56376ffd66 | |||
| f534254063 | |||
| 32347725cb | |||
| 56e762c563 |
15
.gitattributes
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
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
|
||||
autotests/read/pfm/testcard_gray_half.phm binary
|
||||
autotests/read/pfm/testcard_rgb_half.phm binary
|
||||
@ -2,6 +2,22 @@
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
include:
|
||||
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux.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
|
||||
- project: sysadmin/ci-utilities
|
||||
file:
|
||||
- /gitlab-templates/linux-qt6.yml
|
||||
- /gitlab-templates/linux-qt6-next.yml
|
||||
- /gitlab-templates/alpine-qt6.yml
|
||||
- /gitlab-templates/android-qt6.yml
|
||||
- /gitlab-templates/freebsd-qt6.yml
|
||||
- /gitlab-templates/windows-qt6.yml
|
||||
- /gitlab-templates/xml-lint.yml
|
||||
- /gitlab-templates/yaml-lint.yml
|
||||
- /gitlab-templates/oss-fuzz.yml
|
||||
|
||||
image_json_validate:
|
||||
stage: validate
|
||||
image: invent-registry.kde.org/sysadmin/ci-images/suse-qt69:latest
|
||||
tags:
|
||||
- Linux
|
||||
script:
|
||||
- find src/imageformats/ -name *.json | xargs -I file bash -c "echo file && jq -e '(.Keys | type == \"array\") and (.MimeTypes | type == \"array\") and (.MimeTypes | length) == (.Keys | length)' file"
|
||||
|
||||
11
.kde-ci.yml
@ -1,8 +1,11 @@
|
||||
Dependencies:
|
||||
- 'on': ['Linux', 'FreeBSD', 'macOS', 'Windows']
|
||||
'require':
|
||||
- 'on': ['Linux', 'FreeBSD', 'macOS', 'Windows', 'Android']
|
||||
'require':
|
||||
'frameworks/extra-cmake-modules': '@same'
|
||||
'frameworks/karchive' : '@same'
|
||||
'frameworks/karchive': '@same'
|
||||
|
||||
Options:
|
||||
test-before-installing: True
|
||||
test-before-installing: True
|
||||
require-passing-tests-on: ['Linux', 'FreeBSD', 'Windows']
|
||||
cmake-options: "-DKIMAGEFORMATS_DDS=ON -DKIMAGEFORMATS_JXR=ON -DKIMAGEFORMATS_HEIF=ON"
|
||||
per-test-timeout: 90
|
||||
|
||||
@ -1,29 +1,31 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project(KImageFormats)
|
||||
set(KF_VERSION "6.20.0") # handled by release scripts
|
||||
set(KF_DEP_VERSION "6.20.0") # handled by release scripts
|
||||
project(KImageFormats VERSION ${KF_VERSION})
|
||||
|
||||
include(FeatureSummary)
|
||||
find_package(ECM 5.89.0 NO_MODULE)
|
||||
find_package(ECM 6.20.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)
|
||||
|
||||
|
||||
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
|
||||
set(CMAKE_MODULE_PATH ${KImageFormats_SOURCE_DIR}/cmake/find-modules ${ECM_MODULE_PATH})
|
||||
|
||||
include(KDEInstallDirs)
|
||||
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
|
||||
include(KDECMakeSettings)
|
||||
|
||||
include(KDEGitCommitHooks)
|
||||
|
||||
|
||||
include(ECMDeprecationSettings)
|
||||
include(CheckIncludeFiles)
|
||||
include(FindPkgConfig)
|
||||
|
||||
set(REQUIRED_QT_VERSION 5.15.2)
|
||||
find_package(Qt5Gui ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE)
|
||||
set(REQUIRED_QT_VERSION 6.8.0)
|
||||
find_package(Qt6Gui ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE)
|
||||
|
||||
find_package(KF5Archive)
|
||||
set_package_properties(KF5Archive PROPERTIES
|
||||
find_package(KF6Archive ${KF_DEP_VERSION})
|
||||
set_package_properties(KF6Archive PROPERTIES
|
||||
TYPE OPTIONAL
|
||||
PURPOSE "Required for the QImage plugin for Krita and OpenRaster images"
|
||||
)
|
||||
@ -32,12 +34,12 @@ set_package_properties(KF5Archive PROPERTIES
|
||||
# this available in PATH
|
||||
set(BUILD_EPS_PLUGIN FALSE)
|
||||
if (UNIX)
|
||||
find_package(Qt5PrintSupport ${REQUIRED_QT_VERSION} NO_MODULE)
|
||||
set_package_properties(Qt5PrintSupport PROPERTIES
|
||||
find_package(Qt6PrintSupport ${REQUIRED_QT_VERSION} NO_MODULE)
|
||||
set_package_properties(Qt6PrintSupport PROPERTIES
|
||||
PURPOSE "Required for the QImage plugin for EPS images"
|
||||
TYPE OPTIONAL
|
||||
)
|
||||
if (Qt5PrintSupport_FOUND)
|
||||
if (TARGET Qt6::PrintSupport)
|
||||
set(BUILD_EPS_PLUGIN TRUE)
|
||||
endif()
|
||||
endif()
|
||||
@ -51,12 +53,17 @@ set_package_properties(OpenEXR PROPERTIES
|
||||
PURPOSE "Required for the QImage plugin for OpenEXR images"
|
||||
)
|
||||
|
||||
find_package(libavif 0.8.2 CONFIG)
|
||||
find_package(libavif 0.8.2 CONFIG QUIET)
|
||||
if(NOT libavif_FOUND)
|
||||
find_package(libavif 1 CONFIG)
|
||||
endif()
|
||||
set_package_properties(libavif PROPERTIES
|
||||
TYPE OPTIONAL
|
||||
PURPOSE "Required for the QImage plugin for AVIF images"
|
||||
)
|
||||
|
||||
option(KIMAGEFORMATS_DDS "Enable plugin for DDS format" ON)
|
||||
|
||||
option(KIMAGEFORMATS_HEIF "Enable plugin for HEIF format" OFF)
|
||||
if(KIMAGEFORMATS_HEIF)
|
||||
pkg_check_modules(LibHeif IMPORTED_TARGET libheif>=1.10.0)
|
||||
@ -65,21 +72,66 @@ add_feature_info(LibHeif LibHeif_FOUND "required for the QImage plugin for HEIF/
|
||||
|
||||
option(KIMAGEFORMATS_JXL "Enable plugin for JPEG XL format" ON)
|
||||
if(KIMAGEFORMATS_JXL)
|
||||
pkg_check_modules(LibJXL IMPORTED_TARGET libjxl>=0.6.1)
|
||||
pkg_check_modules(LibJXLThreads IMPORTED_TARGET libjxl_threads>=0.6.1)
|
||||
pkg_check_modules(LibJXL IMPORTED_TARGET libjxl>=0.9.4)
|
||||
pkg_check_modules(LibJXLThreads IMPORTED_TARGET libjxl_threads>=0.9.4)
|
||||
pkg_check_modules(LibJXLCMS IMPORTED_TARGET libjxl_cms>=0.9.4)
|
||||
endif()
|
||||
add_feature_info(LibJXL LibJXL_FOUND "required for the QImage plugin for JPEG XL images")
|
||||
|
||||
# 050d00 (5.13) triggers a BIC in qimageiohandler.h, in Qt 5.13, so do not enable that until we can require 5.14
|
||||
# https://codereview.qt-project.org/c/qt/qtbase/+/279215
|
||||
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f02)
|
||||
add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055100)
|
||||
option(KIMAGEFORMATS_JP2 "Enable plugin for JPEG 2000 format" ON)
|
||||
if(KIMAGEFORMATS_JP2)
|
||||
find_package(OpenJPEG CONFIG)
|
||||
endif()
|
||||
add_feature_info(OpenJPEG OpenJPEG_FOUND "required for the QImage plugin for JPEG 2000 images")
|
||||
|
||||
|
||||
find_package(LibRaw 0.20.2)
|
||||
set_package_properties(LibRaw PROPERTIES
|
||||
TYPE OPTIONAL
|
||||
PURPOSE "Required for the QImage plugin for RAW images"
|
||||
)
|
||||
|
||||
# JXR plugin disabled by default due to security issues
|
||||
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.10.0
|
||||
KF 6.19.0
|
||||
)
|
||||
|
||||
add_subdirectory(src)
|
||||
if (BUILD_TESTING)
|
||||
add_subdirectory(autotests)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
||||
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF6ImageFormats")
|
||||
include(CMakePackageConfigHelpers)
|
||||
|
||||
write_basic_package_version_file(
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/KF6ImageFormatsConfigVersion.cmake"
|
||||
VERSION ${PROJECT_VERSION}
|
||||
COMPATIBILITY AnyNewerVersion
|
||||
)
|
||||
|
||||
configure_package_config_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/KF6ImageFormatsConfig.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/KF6ImageFormatsConfig.cmake"
|
||||
INSTALL_DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
|
||||
)
|
||||
|
||||
install(FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/KF6ImageFormatsConfig.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/KF6ImageFormatsConfigVersion.cmake"
|
||||
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
|
||||
COMPONENT Devel
|
||||
)
|
||||
|
||||
include(ECMFeatureSummary)
|
||||
ecm_feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
||||
|
||||
kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
|
||||
|
||||
5
KF6ImageFormatsConfig.cmake.in
Normal file
@ -0,0 +1,5 @@
|
||||
# SPDX-FileCopyrightText: 2025 Xaver Hugl <xaver.hugl@gmail.com>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
|
||||
@PACKAGE_INIT@
|
||||
# empty, because this is plugins for Qt instead of a library to link against
|
||||
202
LICENSES/Apache-2.0.txt
Normal file
@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
9
LICENSES/BSD-2-Clause.txt
Normal file
@ -0,0 +1,9 @@
|
||||
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.
|
||||
11
LICENSES/BSD-3-Clause.txt
Normal file
@ -0,0 +1,11 @@
|
||||
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.
|
||||
427
README.md
@ -1,6 +1,7 @@
|
||||
# KImageFormats
|
||||
|
||||
Plugins to allow QImage to support extra file formats.
|
||||
Plugins to allow [`QImage`](https://doc.qt.io/qt-6/qimage.html) to support
|
||||
extra file formats.
|
||||
|
||||
## Introduction
|
||||
|
||||
@ -14,38 +15,60 @@ image formats.
|
||||
The following image formats have read-only support:
|
||||
|
||||
- Animated Windows cursors (ani)
|
||||
- Camera RAW images (arw, cr2, cr3, dcs, dng, ...)
|
||||
- Gimp (xcf)
|
||||
- OpenEXR (exr)
|
||||
- Photoshop documents (psd)
|
||||
- Sun Raster (ras)
|
||||
- Interchange Format Files (iff, ilbm, lbm)
|
||||
- Krita (kra)
|
||||
- OpenRaster (ora)
|
||||
- Pixar raster (pxr)
|
||||
- Portable FloatMap/HalfMap (pfm, phm)
|
||||
- Photoshop documents (psd, psb, pdd, psdt)
|
||||
- Radiance HDR (hdr)
|
||||
- Scitex CT (sct)
|
||||
- Sun Raster (im1, im8, im24, im32, ras, sun)
|
||||
|
||||
The following image formats have read and write support:
|
||||
|
||||
- AV1 Image File Format (AVIF)
|
||||
- AV1 Image File Format (avif)
|
||||
- DirectDraw Surface (dds)
|
||||
- Encapsulated PostScript (eps)
|
||||
- High Efficiency Image File Format (heif)
|
||||
- JPEG 2000 (jp2, j2k, jpf)
|
||||
- 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 documentation for information on how to write a
|
||||
new plugin.
|
||||
See the [`QImageIOPlugin`](https://doc.qt.io/qt-6/qimageioplugin.html)
|
||||
documentation for information on how to write a new plugin.
|
||||
|
||||
The main difference between this framework and the qimageformats module
|
||||
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.
|
||||
The main difference between this framework and the image formats of Qt is
|
||||
the license. As such, if you write an image format 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.
|
||||
To be accepted, contributions must:
|
||||
- Contain the test images needed to verify that the changes work correctly.
|
||||
- Pass the tests successfully.
|
||||
- Use Qt logging categories for Debug messages.
|
||||
|
||||
For more info about tests, see also [Autotests README](autotests/README.md).
|
||||
|
||||
## Duplicated Plugins
|
||||
|
||||
> [!important]
|
||||
> To ensure you are using the correct plugin, the unwanted one should be
|
||||
renamed or deleted. If several plugins support the same capability, Qt will
|
||||
select one arbitrarily.
|
||||
|
||||
### The TGA plugin
|
||||
|
||||
The TGA plugin supports more formats than Qt's own TGA plugin;
|
||||
specifically, the one provided here supports indexed, greyscale and RLE
|
||||
images (types 1-3 and 9-11), while Qt's plugin only supports type 2
|
||||
@ -56,6 +79,18 @@ licensing. If anyone were willing to write fresh code to improve Qt's
|
||||
TGA plugin, it would allow the TGA plugin in this framework to be
|
||||
removed.
|
||||
|
||||
### The DDS plugin
|
||||
|
||||
The DDS plugin is a fork from Qt 5.6 with bug fixes and improvements.
|
||||
|
||||
The plugin was forked because Qt Project no longer supports its DDS plugin.
|
||||
|
||||
### The JP2 plugin
|
||||
|
||||
The JP2 plugin is based on the popular and wide used OpenJPEG library.
|
||||
|
||||
The Qt project has a no longer supported JPEG 2000 plugin based on Jasper.
|
||||
|
||||
## License
|
||||
|
||||
This framework is licensed under the
|
||||
@ -64,3 +99,365 @@ 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 DDS, EXR, HDR,
|
||||
JXL, 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 available in formats that include it via
|
||||
`QImage::setText()` and `QImage::text()`. To ensure consistent metadata
|
||||
functionality, the following keys have been adopted.
|
||||
|
||||
About the image:
|
||||
- `Altitude`: Floating-point number indicating the GPS altitude in meters
|
||||
above sea level (e.g. 35.4).
|
||||
- `Author`: Person who created the image.
|
||||
- `Comment`: Additional image information in human-readable form, for
|
||||
example a verbal description of the image.
|
||||
- `Copyright`: Copyright notice of the person or organization that claims
|
||||
the copyright to the image.
|
||||
- `CreationDate`: When the image was created or captured. Date and time in
|
||||
ISO 8601 format without milliseconds (e.g. 2024-03-23T15:30:43). This value
|
||||
should be kept unchanged when present.
|
||||
- `Description`: A string that describes the subject of the image.
|
||||
- `Direction`: Floating-point number indicating the direction of the image
|
||||
when it was captured in degrees (e.g. 123.3).
|
||||
- `DocumentName`: The name of the document from which this image was
|
||||
scanned.
|
||||
- `HostComputer`: The computer and/or operating system in use at the time
|
||||
of image creation.
|
||||
- `Latitude`: Floating-point number indicating the latitude in degrees
|
||||
north of the equator (e.g. 27.717).
|
||||
- `Longitude`: Floating-point number indicating the longitude in degrees
|
||||
east of Greenwich (e.g. 85.317).
|
||||
- `ModificationDate`: Last modification date and time in ISO 8601 format
|
||||
without milliseconds (e.g. 2024-03-23T15:30:43). This value should be
|
||||
updated every time the image is saved.
|
||||
- `Owner`: Name of the owner of the image.
|
||||
- `Software`: Name and version number of the software package(s) used to
|
||||
create the image.
|
||||
- `Title`: The title of the image.
|
||||
|
||||
About the camera:
|
||||
- `Manufacturer`: The manufacturer of the recording equipment.
|
||||
- `Model`: The model name or model number of the recording equipment.
|
||||
- `SerialNumber`: The serial number of the recording equipment.
|
||||
|
||||
About the lens:
|
||||
- `LensManufacturer`: The manufacturer of the interchangeable lens that was
|
||||
used.
|
||||
- `LensModel`: The model name or model number of the lens that was used.
|
||||
- `LensSerialNumber`: The serial number of the interchangeable lens that was
|
||||
used.
|
||||
|
||||
Complex metadata (requires a parser):
|
||||
- `XML:org.gimp.xml`: XML metadata generated by GIMP and present only in XCF
|
||||
files.
|
||||
- `XML:com.adobe.xmp`: [Extensible Metadata Platform (XMP)](https://developer.adobe.com/xmp/docs/)
|
||||
is the metadata standard used by Adobe applications and is supported by all
|
||||
common image formats. **Note that XMP metadata is read and written by
|
||||
plugins as is.** Since it may contain information present in other metadata
|
||||
(e.g. `Description`), it is the user's responsibility to ensure consistency
|
||||
between all metadata and XMP metadata when writing an image.
|
||||
|
||||
Supported metadata may vary from one plugin to another. Please note that only
|
||||
the most common metadata are supported and some plugins may return keys not
|
||||
listed here.
|
||||
|
||||
### EXIF Metadata
|
||||
|
||||
[EXIF (Exchangeable Image File Format)](https://en.wikipedia.org/wiki/Exif)
|
||||
metadata is a standard for embedding information within the image file itself.
|
||||
|
||||
Unlike the metadata described above, EXIF metadata is used internally by some
|
||||
plugins to standardize image handling. For example, the JXL plugin uses them
|
||||
to **set/get the image resolution and metadata**. They are also needed to
|
||||
make the image properties appear in the file details of some file managers
|
||||
(e.g. Dolphin).
|
||||
|
||||
When reading, EXIF metadata is converted into simple metadata (e.g.
|
||||
`Description`) and inserted into the image if and only if it is not already
|
||||
present.
|
||||
|
||||
On writing, the image metadata is converted to EXIF and saved appropriately.
|
||||
Note that, if not present in the image to be saved, the following metadata
|
||||
are created automatically:
|
||||
|
||||
- `Software`: Created using `applicationName` and `applicationVersion` methods
|
||||
of [`QCoreApplication`](https://doc.qt.io/qt-6/qcoreapplication.html).
|
||||
- `CreationDate`: Set to current time and date.
|
||||
- `ModificationDate`: Set to current time and date.
|
||||
|
||||
### ICC profile support
|
||||
|
||||
ICC profile support is implemented in all formats that handle them using
|
||||
[`QColorSpace`](https://doc.qt.io/qt-6/qcolorspace.html). When saving, some
|
||||
plugins convert the image using color profiles according to format
|
||||
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()`.
|
||||
|
||||
> [!note]
|
||||
> You can change the maximum limit of 300000 pixels by setting the constant
|
||||
> `KIF_LARGE_IMAGE_PIXEL_LIMIT` to the desired value in the cmake file.
|
||||
|
||||
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
|
||||
- DDS: 300,000 x 300,000 pixels
|
||||
- EXR: 300,000 x 300,000 pixels
|
||||
- EPS: same size as Qt's JPG plugin
|
||||
- HDR: 300,000 x 300,000 pixels
|
||||
- HEIF: n/a
|
||||
- IFF: 65,535 x 65,535 pixels
|
||||
- JP2: 300,000 x 300,000 pixels, in any case no larger than 2 gigapixels
|
||||
- JXL: 262,144 x 262,144 pixels, in any case no larger than 256 megapixels
|
||||
- JXR: 300,000 x 300,000 pixels, in any case no larger than 4 GB
|
||||
- KRA: same size as Qt's PNG plugin
|
||||
- ORA: same size as Qt's PNG plugin
|
||||
- PCX: 65,535 x 65,535 pixels
|
||||
- PFM: 300,000 x 300,000 pixels
|
||||
- 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: 300,000 x 300,000 pixels
|
||||
- RAW: 65,535 x 65,535 pixels
|
||||
- RGB: 65,535 x 65,535 pixels
|
||||
- SCT: 300,000 x 300,000 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.
|
||||
|
||||
JP2, JXL, JXR, PSD and SCT plugins natively support 4-channel CMYK images when
|
||||
compiled with Qt 6.8+.
|
||||
|
||||
### The DDS plugin
|
||||
|
||||
**This plugin can be disabled by setting `KIMAGEFORMATS_DDS` to `OFF`
|
||||
in your cmake options.**
|
||||
|
||||
The following defines can be defined in cmake to modify the behavior of the
|
||||
plugin:
|
||||
- `DDS_DISABLE_STRIDE_ALIGNMENT`: disable the stride aligment based on DDS
|
||||
pitch: it is known that some writers do not set it correctly.
|
||||
|
||||
### The HEIF plugin
|
||||
|
||||
**This plugin is disabled by default. It can be enabled by settings
|
||||
`KIMAGEFORMATS_HEIF` to `ON` in your cmake options.**
|
||||
|
||||
The plugin is disabled due to issues with the heif library on certain
|
||||
distributions. In particular, it is necessary that the HEIF library has
|
||||
support for HEVC codec. If HEVC codec is not available the plugin
|
||||
will compile but will fail the tests.
|
||||
|
||||
### 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 EPS plugin
|
||||
|
||||
The plugin uses `Ghostscript` to convert the raster image. When reading it
|
||||
converts the EPS to PPM and uses the Qt PPM plugin to read the image.
|
||||
When writing it uses [`QPrinter`](https://doc.qt.io/qt-6/qprinter.html) to
|
||||
create a temporary PDF file which is then converted to EPS. Therefore, if
|
||||
`Ghostscript` is not installed, the plugin will not work.
|
||||
|
||||
### 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 IFF plugin
|
||||
|
||||
Interchange File Format is a chunk-based format. Since the original 1985
|
||||
version, various extensions have been created over time.
|
||||
|
||||
The plugin supports the following image data:
|
||||
- FORM ILBM (Interleaved Bitmap): Electronic Arts’ IFF standard for
|
||||
Interchange File Format (EA IFF 1985). ILBM is a format to handle raster
|
||||
images, specifically an InterLeaved bitplane BitMap image with color map.
|
||||
It supports from 1 to 8-bit indexed images with HAM, Halfbride, and normal
|
||||
encoding. It also supports interleaved 24-bit RGB and 32-bit RGBA
|
||||
extension without color map.
|
||||
- FORM ILBM 64: ILBM extension to support 48-bit RGB and 64-bit RGBA encoding.
|
||||
- FORM ACBM (Amiga Contiguous BitMap): It supports uncompressed ACBMs by
|
||||
converting them to ILBMs at runtime.
|
||||
- FORM RGBN / RGB8: It supports 13-bit and 25-bit RGB images with compression
|
||||
type 4.
|
||||
- FORM PBM: PBM is a chunky version of IFF pictures. It supports 8-bit images
|
||||
with color map only.
|
||||
- FOR4 CIMG (Maya Image File Format): It supports 24/48-bit RGB and 32/64-bit
|
||||
RGBA images.
|
||||
|
||||
### The JP2 plugin
|
||||
|
||||
**This plugin can be disabled by setting `KIMAGEFORMATS_JP2` to `OFF`
|
||||
in your cmake options.**
|
||||
|
||||
JP2 plugin has the following limitations due to the lack of support by OpenJPEG:
|
||||
- Metadata are not supported.
|
||||
- Image resolution is not supported.
|
||||
- To write ICC profiles you need OpenJPEG V2.5.4 or higher
|
||||
|
||||
### 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 following defines can be defined in cmake to modify the behavior of the
|
||||
plugin:
|
||||
- `JXL_HDR_PRESERVATION_DISABLED`: disable floating point images (both read
|
||||
and write) by converting them to UINT16 images. Any HDR data is lost. Note
|
||||
that FP images are always disabled when compiling with libJXL less than v0.9.
|
||||
- `JXL_DECODE_BOXES_DISABLED`: disable reading of metadata (e.g. XMP).
|
||||
|
||||
### The JXR plugin
|
||||
|
||||
**This plugin is disabled by default. It can be enabled by settings
|
||||
`KIMAGEFORMATS_JXR` to `ON` in your cmake options.**
|
||||
|
||||
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 KRA plugin
|
||||
|
||||
The KRA format is a ZIP archive containing image data. In particular, the
|
||||
rendered image in PNG format is saved in the root: the plugin reads this
|
||||
image.
|
||||
|
||||
### The ORA plugin
|
||||
|
||||
The ORA format is a ZIP archive containing image data. In particular, the
|
||||
rendered image in PNG format is saved in the root: the plugin reads this
|
||||
image.
|
||||
|
||||
### 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 CMYK if they have 2 or more channels.
|
||||
- Multichannel images are treated as Grayscale if they have 1 channel.
|
||||
- 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 TGA plugin
|
||||
|
||||
TGA plugin supports both version 1 and version 2 of TGA files. When writing,
|
||||
it is possible to force which version to use by setting the following subtypes:
|
||||
- `TGAv1`: force TGA v1.0. No metadata.
|
||||
- `TGAv2` (default): force TGA v2.0 (strict). Adds the TGA Extension Area.
|
||||
- `TGAv2E`: force TGA v2.0 (enhanced). Same as TGA v2.0 (strict) but with the
|
||||
addition of the TGA v2.0 Developer Area with info like, for e.g., Exif data,
|
||||
XMP packet and the ICC profile.
|
||||
|
||||
They are all TGA specs compliant. While for versions 1 and 2 (strict) it is
|
||||
possible to decode all the information with the TGA specification alone, for
|
||||
version 2 (enhanced) it is necessary to know how the additional data is
|
||||
encoded.
|
||||
|
||||
The following defines can be defined in cmake to modify the behavior of the
|
||||
plugin:
|
||||
- `TGA_V2E_AS_DEFAULT`: change the default version of the plugin to `TGAv2E`.
|
||||
|
||||
### 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,7 +1,4 @@
|
||||
#find_package(Qt5Test ${REQUIRED_QT_VERSION} NO_MODULE)
|
||||
|
||||
include(ECMMarkAsTest)
|
||||
include(CMakeParseArguments)
|
||||
|
||||
add_definitions(-DPLUGIN_DIR="${CMAKE_CURRENT_BINARY_DIR}/../bin")
|
||||
remove_definitions(-DQT_NO_CAST_FROM_ASCII)
|
||||
@ -14,39 +11,63 @@ macro(kimageformats_read_tests)
|
||||
endif()
|
||||
|
||||
if (NOT TARGET readtest)
|
||||
add_executable(readtest readtest.cpp)
|
||||
target_link_libraries(readtest Qt5::Gui)
|
||||
add_executable(readtest readtest.cpp templateimage.cpp)
|
||||
target_link_libraries(readtest Qt6::Gui)
|
||||
target_compile_definitions(readtest
|
||||
PRIVATE IMAGEDIR="${CMAKE_CURRENT_SOURCE_DIR}/read")
|
||||
ecm_mark_as_test(readtest)
|
||||
endif()
|
||||
|
||||
foreach(_testname ${KIF_RT_UNPARSED_ARGUMENTS})
|
||||
string(REGEX MATCH "-skipoptional" _is_skip_optional "${_testname}")
|
||||
unset(skip_optional_arg)
|
||||
if (_is_skip_optional)
|
||||
set(skip_optional_arg "--skip-optional-tests")
|
||||
string(REGEX REPLACE "-skipoptional$" "" _testname "${_testname}")
|
||||
endif()
|
||||
add_test(
|
||||
NAME kimageformats-read-${_testname}
|
||||
COMMAND readtest ${_fuzzarg} ${_testname}
|
||||
COMMAND readtest ${skip_optional_arg} ${_fuzzarg} ${_testname}
|
||||
)
|
||||
endforeach(_testname)
|
||||
endmacro()
|
||||
|
||||
macro(kimageformats_write_tests)
|
||||
cmake_parse_arguments(KIF_RT "" "FUZZ" "" ${ARGN})
|
||||
set(_fuzzarg)
|
||||
if (KIF_RT_FUZZ)
|
||||
set(_fuzzarg -f ${KIF_RT_FUZZ})
|
||||
endif()
|
||||
|
||||
if (NOT TARGET writetest)
|
||||
add_executable(writetest writetest.cpp)
|
||||
target_link_libraries(writetest Qt5::Gui)
|
||||
target_link_libraries(writetest Qt6::Gui)
|
||||
target_compile_definitions(writetest
|
||||
PRIVATE IMAGEDIR="${CMAKE_CURRENT_SOURCE_DIR}/write")
|
||||
ecm_mark_as_test(writetest)
|
||||
endif()
|
||||
foreach(_testname ${ARGN})
|
||||
foreach(_testname ${KIF_RT_UNPARSED_ARGUMENTS})
|
||||
string(REGEX MATCH "-lossless$" _is_lossless "${_testname}")
|
||||
string(REGEX MATCH "-nodatacheck" _is_no_data_check "${_testname}")
|
||||
string(REGEX MATCH "-skipoptional" _is_skip_optional "${_testname}")
|
||||
unset(skip_optional_arg)
|
||||
unset(lossless_arg)
|
||||
unset(no_data_check_arg)
|
||||
if (_is_lossless)
|
||||
set(lossless_arg "--lossless")
|
||||
string(REGEX REPLACE "-lossless$" "" _testname "${_testname}")
|
||||
endif()
|
||||
if (_is_no_data_check)
|
||||
set(no_data_check_arg "--no-data-check")
|
||||
string(REGEX REPLACE "-nodatacheck$" "" _testname "${_testname}")
|
||||
endif()
|
||||
if (_is_skip_optional)
|
||||
set(skip_optional_arg "--skip-optional-tests")
|
||||
string(REGEX REPLACE "-skipoptional$" "" _testname "${_testname}")
|
||||
endif()
|
||||
add_test(
|
||||
NAME kimageformats-write-${_testname}
|
||||
COMMAND writetest ${lossless_arg} ${_testname}
|
||||
COMMAND writetest ${lossless_arg} ${no_data_check_arg} ${skip_optional_arg} ${_fuzzarg} ${_testname}
|
||||
)
|
||||
endforeach(_testname)
|
||||
endmacro()
|
||||
@ -56,14 +77,24 @@ endmacro()
|
||||
# result against the data read from the corresponding png file
|
||||
kimageformats_read_tests(
|
||||
hdr
|
||||
iff
|
||||
pcx
|
||||
pfm
|
||||
psd
|
||||
pxr
|
||||
qoi
|
||||
ras
|
||||
rgb
|
||||
sct
|
||||
tga
|
||||
)
|
||||
|
||||
if (KF5Archive_FOUND)
|
||||
if(KIMAGEFORMATS_DDS)
|
||||
kimageformats_read_tests(dds)
|
||||
kimageformats_write_tests(dds-nodatacheck-lossless)
|
||||
endif()
|
||||
|
||||
if (KF6Archive_FOUND)
|
||||
kimageformats_read_tests(
|
||||
kra
|
||||
ora
|
||||
@ -74,23 +105,76 @@ if (TARGET avif)
|
||||
kimageformats_read_tests(
|
||||
avif
|
||||
)
|
||||
kimageformats_write_tests(
|
||||
avif-nodatacheck-lossless
|
||||
)
|
||||
endif()
|
||||
|
||||
if (LibHeif_FOUND)
|
||||
kimageformats_read_tests(
|
||||
heif
|
||||
)
|
||||
# because the plug-ins use RGB->YUV conversion which sometimes results in 1 value difference.
|
||||
kimageformats_write_tests(FUZZ 1
|
||||
heif-nodatacheck-lossless
|
||||
)
|
||||
|
||||
if (LibHeif_VERSION VERSION_GREATER_EQUAL "1.17.0")
|
||||
kimageformats_read_tests(FUZZ 1
|
||||
hej2
|
||||
)
|
||||
kimageformats_write_tests(FUZZ 1
|
||||
hej2-nodatacheck-lossless
|
||||
)
|
||||
endif()
|
||||
|
||||
if (LibHeif_VERSION VERSION_GREATER_EQUAL "1.19.6")
|
||||
kimageformats_read_tests(FUZZ 4
|
||||
avci
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (OpenJPEG_FOUND)
|
||||
kimageformats_read_tests(
|
||||
jp2
|
||||
)
|
||||
# CMYK writing is incorrect in versions before 2.5.3
|
||||
if ("${OPENJPEG_MAJOR_VERSION}.${OPENJPEG_MINOR_VERSION}.${OPENJPEG_BUILD_VERSION}" VERSION_GREATER_EQUAL "2.5.3")
|
||||
kimageformats_write_tests(
|
||||
jp2-nodatacheck-lossless
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (LibJXL_FOUND AND LibJXLThreads_FOUND)
|
||||
if(LibJXL_VERSION VERSION_GREATER_EQUAL "0.11.0")
|
||||
kimageformats_read_tests(
|
||||
jxl
|
||||
)
|
||||
kimageformats_write_tests(
|
||||
jxl-nodatacheck-lossless
|
||||
)
|
||||
else()
|
||||
kimageformats_read_tests(
|
||||
jxl-skipoptional
|
||||
)
|
||||
kimageformats_write_tests(
|
||||
jxl-skipoptional-nodatacheck-lossless
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (LibJXR_FOUND)
|
||||
kimageformats_read_tests(
|
||||
jxl
|
||||
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
|
||||
kimageformats_read_tests(
|
||||
xcf
|
||||
)
|
||||
|
||||
@ -101,10 +185,11 @@ kimageformats_read_tests(FUZZ 1
|
||||
# You can append -lossless to the format to indicate that
|
||||
# reading back the image data will result in an identical image.
|
||||
kimageformats_write_tests(
|
||||
pcx-lossless
|
||||
pcx-nodatacheck
|
||||
pic-lossless
|
||||
qoi-lossless
|
||||
rgb-lossless
|
||||
tga # fixme: the alpha images appear not to be written properly
|
||||
tga-nodatacheck
|
||||
)
|
||||
|
||||
# EPS read tests depend on the vagaries of GhostScript
|
||||
@ -114,22 +199,35 @@ kimageformats_write_tests(
|
||||
# kimageformats_write_tests(eps)
|
||||
#endif()
|
||||
if (OpenEXR_FOUND)
|
||||
# FIXME: OpenEXR tests
|
||||
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 6
|
||||
exr-nodatacheck-lossless
|
||||
)
|
||||
endif()
|
||||
|
||||
find_package(Qt5Test ${REQUIRED_QT_VERSION} CONFIG QUIET)
|
||||
if (LibRaw_FOUND)
|
||||
kimageformats_read_tests(
|
||||
raw
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT Qt5Test_FOUND)
|
||||
message(STATUS "Qt5Test not found, some autotests will not be built.")
|
||||
find_package(Qt6Test ${REQUIRED_QT_VERSION} CONFIG QUIET)
|
||||
|
||||
if(NOT TARGET Qt6::Test)
|
||||
message(STATUS "Qt6Test not found, some autotests will not be built.")
|
||||
return()
|
||||
endif()
|
||||
|
||||
add_executable(pictest pictest.cpp)
|
||||
target_link_libraries(pictest Qt5::Gui Qt5::Test)
|
||||
target_link_libraries(pictest Qt6::Gui Qt6::Test)
|
||||
ecm_mark_as_test(pictest)
|
||||
add_test(NAME kimageformats-pic COMMAND pictest)
|
||||
|
||||
add_executable(anitest anitest.cpp)
|
||||
target_link_libraries(anitest Qt5::Gui Qt5::Test)
|
||||
target_link_libraries(anitest Qt6::Gui Qt6::Test)
|
||||
ecm_mark_as_test(anitest)
|
||||
add_test(NAME kimageformats-ani COMMAND anitest)
|
||||
|
||||
260
autotests/README.md
Normal file
@ -0,0 +1,260 @@
|
||||
# Autotests
|
||||
|
||||
Automated testing for plugins to allow
|
||||
[`QImage`](https://doc.qt.io/qt-6/qimage.html) to support
|
||||
extra file formats.
|
||||
|
||||
## Introduction
|
||||
|
||||
The testing part is essential for the correct functioning of the plugins.
|
||||
There are generic read/write tests and specific tests for the plugins that
|
||||
require them.
|
||||
|
||||
## Read tests
|
||||
|
||||
The generic reading tests are contained in the `read` folder. Inside the
|
||||
`read` folder, there are one or more folders for each plugin to be tested.
|
||||
A plugin can support multiple image file types, and if you need different
|
||||
parameters for each type, you need to create a folder for each type supported
|
||||
by the plugin (see e.g. HEIF plugin). If all formats supported by the plugin
|
||||
do not require different parameters, a single folder approach is simpler (see
|
||||
e.g. PSD plugin).
|
||||
|
||||
The reading tests are mainly based on comparing the image read by the plugin
|
||||
with a template in a known and working format. For this reason, the template
|
||||
formats chosen are those distributed by the Qt project: PNG in the first
|
||||
instance and TIFF for image formats not supported by PNG (e.g. CMYK images).
|
||||
|
||||
Some image options such as `QImageIOHandler::Size`,
|
||||
`QImageIOHandler::ImageFormat` and `QImageIOHandler::ImageTransformation` are
|
||||
also checked. If supported by the plugin, the resulting image is checked to
|
||||
see if it is compatible with the option's specification.
|
||||
|
||||
Optionally, for each image, you can also create a JSON file to modify the test
|
||||
behavior and/or verify data other than image pixels, such as metadata.
|
||||
|
||||
Finally, two tests are run for each test case:
|
||||
- On a random access device: this test must not fail.
|
||||
- On a sequential access device: a plugin may not support sequential operation.
|
||||
In this case, the test is skipped. However, if an image is returned, the test
|
||||
must succeed.
|
||||
|
||||
### The readtest command
|
||||
|
||||
To start a test, run the `readtest` command with the format to test as an
|
||||
argument. The format is one of those supported by plugins and a folder with
|
||||
the name of the format must be present inside the `read` folder.
|
||||
Depending on the format, you can specify the following additional options.
|
||||
|
||||
- `--help`: Displays help on commandline options.
|
||||
- `--fuzz <max>`: The fuzziness. Used to add some deviation in ARGB data
|
||||
(nornally used on lossy codec).
|
||||
- `--perceptive-fuzz`: Used to scale dynamically the fuzziness based on
|
||||
the alpha channel value. This is useful on images with pre-multiplied and
|
||||
small alphas. Qt can use different roundings based on optimizations resulting
|
||||
in very different RGB values. Since the alpha is small visually there is no
|
||||
difference (so it is not considered an error).
|
||||
- `--skip-optional-tests`: Used to skip the optional test such as metadata
|
||||
and resolution tests.
|
||||
|
||||
Note that some tests may fail if the correct options are not used. The correct
|
||||
options for each test are defined in [CMakeLists.txt](CMakeLists.txt).
|
||||
See also [Add a test to CMakeLists.txt](#add-a-test-to-cmakeliststxt).
|
||||
|
||||
### Test image nomenclature
|
||||
|
||||
Each test consists of the image to test, the verification image(s) (template)
|
||||
and, optionally, the additional JSON file.
|
||||
To be a test, the names of these files must be the same (except for
|
||||
the extension). A test for a JXL image would be, for example, composed like
|
||||
this:
|
||||
- `testRGB.jxl`: The image to test.
|
||||
- `testRGB.jxl.json`: The test behavior modifier (note that it must contain
|
||||
the double extension).
|
||||
- `testRGB.png`: How the image should look (template). The template name
|
||||
can be different if specified in the JSON file.
|
||||
|
||||
Although there is no precise rule for the name of a test, it is good to have
|
||||
a name that is explanatory.
|
||||
|
||||
### JSON behavior file
|
||||
|
||||
The behavior file was initially introduced to solve compatibility issues
|
||||
between different versions of Qt supported by the framework. It was later
|
||||
extended to also check image metadata.
|
||||
|
||||
The JSON file consists of an array of JSON objects. The objects in the array
|
||||
are iterated sequentially and the first object that matches the requirements
|
||||
is used for testing (successes are ignored).
|
||||
|
||||
Supported values for JSON objects:
|
||||
- `colorSpace` : Type `object`. An object with the `description` (type
|
||||
`string`), `primaries` (type `string`), `transferFunction` (type `string`),
|
||||
`colorModel` (type `string`) and `gamma` (type `double`) values of the
|
||||
image color space.
|
||||
- `comment`: Type `string`. A string shown by the test when a condition occurs.
|
||||
- `description`: Type `string`. A description of the object. Not used by the
|
||||
test.
|
||||
- `disableAutoTransform`: Type `boolean`. By default, tests are run with
|
||||
autotransform enabled (i.e. rotation is applied if the plugin supports it).
|
||||
Set to `true` to disable autotransform.
|
||||
- `fileName`: Type `string`. Name of the template file to use. E.g.
|
||||
"testRGB_Qt_6_2.png".
|
||||
- `fuzziness`: Type `integer`. Set the fuzziness only if not already set on the
|
||||
command line. The value set on the command line wins over the one in the JSON
|
||||
file.
|
||||
- `maxQtVersion`: Type `string`. Maximum Qt version this object is compatible
|
||||
with (if not set means all). E.g. "6.2.99".
|
||||
- `metadata`: Type `array`. An array of key/value objects (string type)
|
||||
containing the image metadata as returned by `QImage::text`.
|
||||
- `minQtVersion`: Type `string`. Minimum Qt version this object is compatible
|
||||
with (if not set means all). E.g. "6.2.0".
|
||||
- `perceptiveFuzziness` Type `boolean`. Set the perceptive fuzziness only if not
|
||||
already set on the command line. The value set on the command line wins over
|
||||
the one in the JSON file.
|
||||
- `resolution`: Type `object`. An object with the `dotsPerMeterX` (type `integer`)
|
||||
and `dotsPerMeterY` (type `integer`) values of the image.
|
||||
- `seeAlso`: Type `string`. More info about the object. Normally used to point
|
||||
to bug reports. Not used by the test.
|
||||
- `skipSequential`: Type `boolean`. Skip the test on sequential access device.
|
||||
Some plugins may have limited functionality on sequential devices (e.g.,
|
||||
not reading metadata).
|
||||
- `unsupportedFormat`: Type `boolean`. When true, the test is skipped.
|
||||
|
||||
Some examples:
|
||||
- Example 1: [Runs only on Qt without alpha bug on float formats](read/jxl/testcard_rgba_fp16.jxl.json)
|
||||
- Example 2: [Rotation disabled](read/jxl/orientation6_notranfs.jxl.json)
|
||||
- Example 3: [Metadata](read/psd/metadata.psd.json)
|
||||
- Example 4: [Check Qt version, resolution and metadata](read/psd/mch-16bits.psd.json)
|
||||
- Example 5: [Fuzziness setting](read/xcf/birthday16.xcf.json)
|
||||
- Example 6: [Color space](read/dds/rgba_f16.dds.json)
|
||||
|
||||
These are just a few examples. More examples can be found in the test folders.
|
||||
|
||||
## Write tests
|
||||
|
||||
The generic writing tests are contained in the `write/basic` and
|
||||
`write/format` folders. Similar to the read tests, they verify the written
|
||||
(and then reread) image with a template.
|
||||
|
||||
The write test is composed of several phases:
|
||||
- Basic test: Uses the `write/basic` folder and checks the most common images
|
||||
and, optionally, metadata and resolution via a JSON properties file.
|
||||
- Format test: Uses the `write/format` folder and checks that all QImage image
|
||||
formats are written correctly.
|
||||
- Dimensional test: Uses the `write/format` folder and check images of
|
||||
different sizes (odd numbers, prime numbers, etc.) to verify internal
|
||||
alignments.
|
||||
- Null device test: Verify that there are no crashes if the device is null.
|
||||
|
||||
### The writetest command
|
||||
|
||||
To start a test, run the `writetest` command with the format to test as an
|
||||
argument. The format is one of those supported by plugins, a folder with
|
||||
the name of the format must be present inside the `write/format` folder and
|
||||
may need a template image in `write/basic`.
|
||||
Depending on the format, you can specify the following additional options.
|
||||
|
||||
- `--help`: Displays help on commandline options.
|
||||
- `--create-format-templates`: Create template images for all formats
|
||||
supported by the QImage in `write/format`. Command to simplify the creation of
|
||||
format test images when adding a new plugin or modifying an old one. This
|
||||
command is not intended to be used from the CMakeLists file as it must be used
|
||||
manually and the generated images must be verified one by one.
|
||||
- `--fuzz <max>`: The fuzziness. Used to add some deviation in ARGB data
|
||||
(nornally used on lossy codec).
|
||||
- `--lossless`: Check that reading back the data gives the same image.
|
||||
- `--no-data-check`: Don't check that write data is exactly the same.
|
||||
- `--skip-optional-tests`: Skip optional data tests (metadata, resolution,
|
||||
etc...).
|
||||
|
||||
Note that some tests may fail if the correct options are not used. The correct
|
||||
options for each test are defined in [CMakeLists.txt](CMakeLists.txt).
|
||||
See also [Add a test to CMakeLists.txt](#add-a-test-to-cmakeliststxt).
|
||||
|
||||
### JSON properties file
|
||||
|
||||
The properties file must be located in `write/basic` and must have the name
|
||||
of the file format (e.g. jxl.json). It is a JSON object composed of the
|
||||
following values:
|
||||
- `format`: Type `string`. The format tested.
|
||||
- `metadata`: Type `array`. An array of key/value objects (string type)
|
||||
containing the image metadata as returned by `QImage::text`.
|
||||
- `resolution`: Type `object`. An object with the `dotsPerMeterX` and `
|
||||
dotsPerMeterY` (integer) values of the image.
|
||||
- `subType`: type `string`. The image writer subtype to set when testing.
|
||||
|
||||
[This is an example](write/basic/jxl.json) of property file.
|
||||
|
||||
|
||||
## Custom tests
|
||||
|
||||
If the generic read/write tests do not meet the requirements of a plugin,
|
||||
it is possible to write a custom test.
|
||||
In general it makes sense to write a dedicated test for a format if and
|
||||
only if you are testing unique features not present in other plugins.
|
||||
|
||||
### The PIC test
|
||||
|
||||
The PIC test is generated using Qt Test class. For more information
|
||||
see [Qt Test](https://doc.qt.io/qt-6/qttest-index.html).
|
||||
|
||||
### The ANI test
|
||||
|
||||
The ANI test is generated using Qt Test class. For more information
|
||||
see [Qt Test](https://doc.qt.io/qt-6/qttest-index.html).
|
||||
|
||||
|
||||
## Add a test to CMakeLists.txt
|
||||
|
||||
To add a test to CMake use the `kimageformats_read_tests` and
|
||||
`kimageformats_write_tests` functions. For example, to add the read
|
||||
tests for the PSD you just write `kimageformats_read_tests(psd)`.
|
||||
|
||||
It is also possible to pass command line arguments to the test by
|
||||
appropriately composing the string passed to the test functions.
|
||||
For boolean parameters you need to add a string starting with '-'
|
||||
after the image format. For example, to pass `--skip-optional-tests`
|
||||
to the PSD plugin write `kimageformats_read_tests(psd-skipoptional)`.
|
||||
|
||||
To add a fuzziness of 4, you must first set it as follows:
|
||||
`kimageformats_read_tests(FUZZ 4 psd-skipoptional)`.
|
||||
|
||||
The possible modifiers for `kimageformats_read_tests` are as follows:
|
||||
- `-skipoptional`: Add the `--skip-optional-tests` command line parameter.
|
||||
|
||||
The possible modifiers for `kimageformats_write_tests` are as follows:
|
||||
- `-lossless`: Add the `--lossless` command line parameter.
|
||||
- `-nodatacheck`: Add the `--no-data-check` command line parameter.
|
||||
- `-skipoptional`: Add the `--skip-optional-tests` command line parameter.
|
||||
|
||||
To set multiple parameters, you can enter multiple modifiers. For example:
|
||||
```
|
||||
kimageformats_write_tests(FUZZ 1
|
||||
hej2-nodatacheck-lossless
|
||||
)
|
||||
```
|
||||
|
||||
## OSS-Fuzz
|
||||
|
||||
Plugins are also tested with [OSS-Fuzz](https://google.github.io/oss-fuzz/)
|
||||
project to identify possible security issues. When adding a new plugin it is
|
||||
also necessary to add it to the test in the [ossfuzz](ossfuzz) directory.
|
||||
|
||||
## TODO
|
||||
|
||||
List of tests not implemented or only partially implemented.
|
||||
|
||||
### Color Profiles Test
|
||||
|
||||
Many plugins support color profiles via [`QColorSpace`](https://doc.qt.io/qt-6/qcolorspace.html).
|
||||
Checking for correct color management is increasingly necessary especially now
|
||||
that monitors are HDR and other than RGB color spaces have been added to Qt.
|
||||
|
||||
Furthermore, lossy plugins often have different color management behaviors
|
||||
depending on how the image is saved.
|
||||
|
||||
### Animations Test
|
||||
|
||||
Few plugins support animations. There are currently no plans for
|
||||
implementation.
|
||||
69
autotests/fuzzyeq.cpp
Normal file
@ -0,0 +1,69 @@
|
||||
/*
|
||||
SPDX-FileCopyrightText: 2014 Alex Merry <alex.merry@kdemail.net>
|
||||
|
||||
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
||||
*/
|
||||
|
||||
#include <QImage>
|
||||
#include <QRgb>
|
||||
#include <QRgba64>
|
||||
|
||||
inline int iAbs(const int &v)
|
||||
{
|
||||
return v < 0 ? -v : v;
|
||||
}
|
||||
|
||||
template<class Trait>
|
||||
static bool fuzzyeq(const QImage &im1, const QImage &im2, int fuzziness, bool perceptiveFuzzer)
|
||||
{
|
||||
Q_ASSERT(im1.format() == im2.format());
|
||||
Q_ASSERT(im1.depth() == 24 || im1.depth() == 32 || im1.depth() == 64);
|
||||
|
||||
const bool hasAlpha = im1.hasAlphaChannel();
|
||||
const int height = im1.height();
|
||||
const int width = im1.width();
|
||||
for (int i = 0; i < height; ++i) {
|
||||
const Trait *line1 = reinterpret_cast<const Trait *>(im1.scanLine(i));
|
||||
const Trait *line2 = reinterpret_cast<const Trait *>(im2.scanLine(i));
|
||||
for (int j = 0; j < width; ++j) {
|
||||
auto &&px1 = line1[j];
|
||||
auto &&px2 = line2[j];
|
||||
auto fuzz = int(fuzziness);
|
||||
|
||||
// Calculate the deltas
|
||||
auto dr = iAbs(int(qRed(px2)) - int(qRed(px1)));
|
||||
auto dg = iAbs(int(qGreen(px2)) - int(qGreen(px1)));
|
||||
auto db = iAbs(int(qBlue(px2)) - int(qBlue(px1)));
|
||||
auto da = iAbs(int(qAlpha(px2)) - int(qAlpha(px1)));
|
||||
|
||||
// Always compare alpha even on images without it: some formats (e.g. RGBX64),
|
||||
// want it set to a certain value (e.g. 65535).
|
||||
if (da > fuzz)
|
||||
return false;
|
||||
|
||||
// Calculate the perceptive fuzziness.
|
||||
if (hasAlpha && perceptiveFuzzer) {
|
||||
auto alpha = std::max(4, int(qAlpha(px1)));
|
||||
if (sizeof(Trait) == 4)
|
||||
fuzz = std::min(fuzz * (255 / alpha), 255);
|
||||
else
|
||||
fuzz = std::min(fuzz * (65535 / alpha), 255 * 257);
|
||||
}
|
||||
|
||||
// Compare the deltas of R, G, B components.
|
||||
if (dr > fuzz)
|
||||
return false;
|
||||
if (dg > fuzz)
|
||||
return false;
|
||||
if (db > fuzz)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// allow each byte to be different by up to 1, to allow for rounding errors
|
||||
static bool fuzzyeq(const QImage &im1, const QImage &im2, uchar fuzziness, bool perceptiveFuzzer = false)
|
||||
{
|
||||
return (im1.depth() == 64) ? fuzzyeq<QRgba64>(im1, im2, int(fuzziness) * 257, perceptiveFuzzer) : fuzzyeq<QRgb>(im1, im2, int(fuzziness), perceptiveFuzzer);
|
||||
}
|
||||
194
autotests/ossfuzz/build_fuzzers.sh
Executable file
@ -0,0 +1,194 @@
|
||||
#!/bin/bash -eu
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2020 Google LLC
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
# Copyright 2020 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# build zstd
|
||||
cd $SRC/zstd
|
||||
cmake -S build/cmake -DBUILD_SHARED_LIBS=OFF
|
||||
make install -j$(nproc)
|
||||
|
||||
# Build zlib
|
||||
cd $SRC/zlib
|
||||
./configure --static
|
||||
make install -j$(nproc)
|
||||
|
||||
# Build bzip2
|
||||
# Inspired from ../bzip2/build
|
||||
cd $SRC
|
||||
tar xzf bzip2-*.tar.gz && rm -f bzip2-*.tar.gz
|
||||
cd bzip2-*
|
||||
SRCL=(blocksort.o huffman.o crctable.o randtable.o compress.o decompress.o bzlib.o)
|
||||
|
||||
for source in ${SRCL[@]}; do
|
||||
name=$(basename $source .o)
|
||||
$CC $CFLAGS -c ${name}.c
|
||||
done
|
||||
rm -f libbz2.a
|
||||
ar cq libbz2.a ${SRCL[@]}
|
||||
cp -f bzlib.h /usr/local/include
|
||||
cp -f libbz2.a /usr/local/lib
|
||||
|
||||
# Build xz
|
||||
export ORIG_CFLAGS="${CFLAGS}"
|
||||
export ORIG_CXXFLAGS="${CXXFLAGS}"
|
||||
unset CFLAGS
|
||||
unset CXXFLAGS
|
||||
cd $SRC/xz
|
||||
./autogen.sh --no-po4a --no-doxygen
|
||||
./configure --enable-static --disable-debug --disable-shared --disable-xz --disable-xzdec --disable-lzmainfo
|
||||
make install -j$(nproc)
|
||||
export CFLAGS="${ORIG_CFLAGS}"
|
||||
export CXXFLAGS="${ORIG_CXXFLAGS}"
|
||||
|
||||
# Build qt
|
||||
cd $SRC/qtbase
|
||||
./configure -no-glib -qt-libpng -qt-pcre -opensource -confirm-license -static -no-opengl -no-icu -platform linux-clang-libc++ -debug -prefix /usr -no-feature-widgets -no-feature-sql -no-feature-network -no-feature-xml -no-feature-dbus -no-feature-printsupport
|
||||
cmake --build . --parallel $(nproc)
|
||||
cmake --install .
|
||||
|
||||
# Build extra-cmake-modules
|
||||
cd $SRC/extra-cmake-modules
|
||||
cmake . -DBUILD_TESTING=OFF
|
||||
make install -j$(nproc)
|
||||
|
||||
cd $SRC/karchive
|
||||
rm -rf poqm
|
||||
cmake . -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=/usr/local
|
||||
make install -j$(nproc)
|
||||
|
||||
# Build JXRlib
|
||||
cd $SRC/jxrlib
|
||||
make -j$(nproc)
|
||||
|
||||
# Build LibRaw
|
||||
cd $SRC/LibRaw
|
||||
TMP_CFLAGS=$CFLAGS
|
||||
TMP_CXXFLAGS=$CXXFLAGS
|
||||
CFLAGS="$CFLAGS -fno-sanitize=function,vptr"
|
||||
CXXFLAGS="$CXXFLAGS -fno-sanitize=function,vptr"
|
||||
autoreconf --install
|
||||
./configure --disable-examples
|
||||
make -j$(nproc)
|
||||
make install -j$(nproc)
|
||||
CFLAGS=$TMP_CFLAGS
|
||||
CXXFLAGS=$TMP_CXXFLAGS
|
||||
|
||||
|
||||
# Build aom
|
||||
cd $SRC/aom
|
||||
mkdir build.libavif
|
||||
cd build.libavif
|
||||
extra_libaom_flags='-DAOM_MAX_ALLOCABLE_MEMORY=536870912 -DDO_RANGE_CHECK_CLAMP=1'
|
||||
cmake -DBUILD_SHARED_LIBS=0 -DENABLE_DOCS=0 -DENABLE_EXAMPLES=0 -DENABLE_TESTDATA=0 -DENABLE_TESTS=0 -DENABLE_TOOLS=0 -DCONFIG_PIC=1 -DAOM_TARGET_CPU=generic -DCONFIG_SIZE_LIMIT=1 -DDECODE_HEIGHT_LIMIT=12288 -DDECODE_WIDTH_LIMIT=12288 -DAOM_EXTRA_C_FLAGS="${extra_libaom_flags}" -DAOM_EXTRA_CXX_FLAGS="${extra_libaom_flags}" ..
|
||||
make -j$(nproc)
|
||||
make install -j$(nproc)
|
||||
|
||||
# Build libavif
|
||||
cd $SRC/libavif
|
||||
ln -s "$SRC/aom" "$SRC/libavif/ext/"
|
||||
mkdir build
|
||||
cd build
|
||||
CFLAGS="$CFLAGS -fPIC" cmake -DBUILD_SHARED_LIBS=OFF -DAVIF_ENABLE_WERROR=OFF -DAVIF_CODEC_AOM=LOCAL -DAVIF_LIBYUV=OFF ..
|
||||
make -j$(nproc)
|
||||
|
||||
# Build libde265
|
||||
cd $SRC/libde265
|
||||
cmake -DBUILD_SHARED_LIBS=OFF -DDISABLE_SSE=ON .
|
||||
make -j$(nproc)
|
||||
make install -j$(nproc)
|
||||
|
||||
# Build openjpeg
|
||||
cd $SRC/openjpeg
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -DBUILD_CODEC=OFF ..
|
||||
make -j$(nproc)
|
||||
make install -j$(nproc)
|
||||
|
||||
# build openh264
|
||||
cd $SRC/openh264
|
||||
make USE_ASM=No BUILDTYPE=Debug install-static -j$(nproc)
|
||||
|
||||
# Build openexr
|
||||
cd $SRC/openexr
|
||||
mkdir _build
|
||||
cd _build
|
||||
cmake -DBUILD_SHARED_LIBS=OFF ..
|
||||
make -j$(nproc)
|
||||
make install -j$(nproc)
|
||||
|
||||
# Build libheif
|
||||
cd $SRC/libheif
|
||||
#Reduce max width and height to avoid allocating too much memory
|
||||
sed -i "s/static const int MAX_IMAGE_WIDTH = 32768;/static const int MAX_IMAGE_WIDTH = 8192;/g" libheif/security_limits.h
|
||||
sed -i "s/static const int MAX_IMAGE_HEIGHT = 32768;/static const int MAX_IMAGE_HEIGHT = 8192;/g" libheif/security_limits.h
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DBUILD_SHARED_LIBS=OFF -DENABLE_PLUGIN_LOADING=OFF -DWITH_DAV1D=OFF -DWITH_EXAMPLES=OFF -DWITH_LIBDE265=ON -DWITH_RAV1E=OFF -DWITH_RAV1E_PLUGIN=OFF -DWITH_SvtEnc=OFF -DWITH_SvtEnc_PLUGIN=OFF -DWITH_X265=OFF -DWITH_OpenJPEG_DECODER=ON -DWITH_OpenH264_DECODER=ON ..
|
||||
make -j$(nproc)
|
||||
make install -j$(nproc)
|
||||
|
||||
# Build libjxl
|
||||
cd $SRC/libjxl
|
||||
mkdir build
|
||||
cd build
|
||||
CXXFLAGS="$CXXFLAGS -DHWY_COMPILE_ONLY_SCALAR" cmake -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DJPEGXL_ENABLE_BENCHMARK=OFF -DJPEGXL_ENABLE_DOXYGEN=OFF -DJPEGXL_ENABLE_EXAMPLES=OFF -DJPEGXL_ENABLE_JNI=OFF -DJPEGXL_ENABLE_JPEGLI=OFF -DJPEGXL_ENABLE_JPEGLI_LIBJPEG=OFF -DJPEGXL_ENABLE_MANPAGES=OFF -DJPEGXL_ENABLE_OPENEXR=OFF -DJPEGXL_ENABLE_PLUGINS=OFF -DJPEGXL_ENABLE_SJPEG=OFF -DJPEGXL_ENABLE_SKCMS=ON -DJPEGXL_ENABLE_TCMALLOC=OFF -DJPEGXL_ENABLE_TOOLS=OFF -DJPEGXL_ENABLE_FUZZERS=OFF ..
|
||||
make -j$(nproc) jxl jxl_cms jxl_threads
|
||||
|
||||
cd $SRC/kimageformats
|
||||
HANDLER_TYPES="ANIHandler ani
|
||||
QAVIFHandler avif
|
||||
QDDSHandler dds
|
||||
EXRHandler exr
|
||||
HDRHandler hdr
|
||||
HEIFHandler heif
|
||||
IFFHandler iff
|
||||
JP2Handler jp2
|
||||
QJpegXLHandler jxl
|
||||
JXRHandler jxr
|
||||
KraHandler kra
|
||||
OraHandler ora
|
||||
PCXHandler pcx
|
||||
PFMHandler pfm
|
||||
SoftimagePICHandler pic
|
||||
PSDHandler psd
|
||||
PXRHandler pxr
|
||||
QOIHandler qoi
|
||||
RASHandler ras
|
||||
RAWHandler raw
|
||||
RGBHandler rgb
|
||||
ScitexHandler sct
|
||||
TGAHandler tga
|
||||
XCFHandler xcf"
|
||||
|
||||
echo "$HANDLER_TYPES" | while read class format; do
|
||||
(
|
||||
fuzz_target_name=kimgio_${format}_fuzzer
|
||||
|
||||
/usr/libexec/moc $SRC/kimageformats/src/imageformats/$format.cpp -o $format.moc
|
||||
header=`ls $SRC/kimageformats/src/imageformats/$format*.h`
|
||||
/usr/libexec/moc $header -o moc_`basename $header .h`.cpp
|
||||
$CXX $CXXFLAGS -fPIC -DHANDLER=$class -std=c++17 autotests/ossfuzz/kimgio_fuzzer.cc $SRC/kimageformats/src/imageformats/$format.cpp $SRC/kimageformats/src/imageformats/scanlineconverter.cpp $SRC/kimageformats/src/imageformats/microexif.cpp $SRC/kimageformats/src/imageformats/chunks.cpp -o $OUT/$fuzz_target_name -DJXL_STATIC_DEFINE -DJXL_THREADS_STATIC_DEFINE -DJXL_CMS_STATIC_DEFINE -DINITGUID -I $SRC/kimageformats/src/imageformats/ -I $SRC/libavif/include/ -I $SRC/libjxl/build/lib/include/ -I $SRC/libjxl/lib/include/ -I /usr/local/include/OpenEXR/ -I /usr/local/include/KF6/KArchive/ -I /usr/local/include/openjpeg-2.5 -I /usr/local/include/Imath -I $SRC/jxrlib/common/include -I $SRC/jxrlib/jxrgluelib -I $SRC/jxrlib/image/sys -I /usr/include/QtCore/ -I /usr/include/QtGui/ -I . $SRC/libavif/build/libavif.a /usr/local/lib/libheif.a /usr/local/lib/libde265.a /usr/local/lib/libopenh264.a $SRC/aom/build.libavif/libaom.a $SRC/libjxl/build/lib/libjxl_threads.a $SRC/libjxl/build/lib/libjxl.a $SRC/libjxl/build/lib/libjxl_cms.a $SRC/libjxl/build/third_party/highway/libhwy.a $SRC/libjxl/build/third_party/brotli/libbrotlidec.a $SRC/libjxl/build/third_party/brotli/libbrotlienc.a $SRC/libjxl/build/third_party/brotli/libbrotlicommon.a -lQt6Gui -lQt6Core -lQt6BundledLibpng -lQt6BundledHarfbuzz -lm -lQt6BundledPcre2 -ldl -lpthread $LIB_FUZZING_ENGINE /usr/local/lib/libz.a -lKF6Archive /usr/local/lib/libz.a /usr/local/lib/libraw.a /usr/local/lib/libOpenEXR-3_3.a /usr/local/lib/libIex-3_3.a /usr/local/lib/libImath-3_1.a /usr/local/lib/libIlmThread-3_3.a /usr/local/lib/libOpenEXRCore-3_3.a /usr/local/lib/libOpenEXRUtil-3_3.a /usr/local/lib/libopenjp2.a /usr/local/lib/libzstd.a $SRC/jxrlib/build/libjxrglue.a $SRC/jxrlib/build/libjpegxr.a -llzma /usr/local/lib/libbz2.a -lclang_rt.builtins
|
||||
|
||||
# -lclang_rt.builtins in the previous line is a temporary workaround to avoid a linker error "undefined reference to __truncsfhf2". Investigate why this is needed here, but not anywhere else, and possibly remove it.
|
||||
|
||||
find . -name "*.${format}" | zip -q $OUT/${fuzz_target_name}_seed_corpus.zip -@
|
||||
)
|
||||
done
|
||||
76
autotests/ossfuzz/kimgio_fuzzer.cc
Normal file
@ -0,0 +1,76 @@
|
||||
/*
|
||||
# SPDX-FileCopyrightText: 2018 Google Inc.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
# Copyright 2018 Google Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
################################################################################
|
||||
*/
|
||||
|
||||
/*
|
||||
Usage:
|
||||
python infra/helper.py build_image kimageformats
|
||||
python infra/helper.py build_fuzzers --sanitizer undefined|address|memory kimageformats
|
||||
python infra/helper.py run_fuzzer kimageformats kimgio_[ani|avif|dds|exr|hdr|heif|iff|jp2|jxl|jxr|kra|ora|pcx|pfm|pic|psd|pxr|qoi|ras|raw|rgb|sct|tga|xcf]_fuzzer
|
||||
*/
|
||||
|
||||
#include <QBuffer>
|
||||
#include <QCoreApplication>
|
||||
#include <QImage>
|
||||
|
||||
#include "ani_p.h"
|
||||
#include "avif_p.h"
|
||||
#include "dds_p.h"
|
||||
#include "exr_p.h"
|
||||
#include "hdr_p.h"
|
||||
#include "heif_p.h"
|
||||
#include "iff_p.h"
|
||||
#include "jp2_p.h"
|
||||
#include "jxl_p.h"
|
||||
#include "jxr_p.h"
|
||||
#include "kra.h"
|
||||
#include "ora.h"
|
||||
#include "pcx_p.h"
|
||||
#include "pfm_p.h"
|
||||
#include "pic_p.h"
|
||||
#include "psd_p.h"
|
||||
#include "pxr_p.h"
|
||||
#include "qoi_p.h"
|
||||
#include "ras_p.h"
|
||||
#include "raw_p.h"
|
||||
#include "rgb_p.h"
|
||||
#include "sct_p.h"
|
||||
#include "tga_p.h"
|
||||
#include "xcf_p.h"
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
{
|
||||
int argc = 0;
|
||||
QCoreApplication a(argc, nullptr);
|
||||
|
||||
QImageIOHandler* handler = new HANDLER();
|
||||
|
||||
QImage i;
|
||||
QBuffer b;
|
||||
b.setData((const char *)data, size);
|
||||
b.open(QIODevice::ReadOnly);
|
||||
handler->setDevice(&b);
|
||||
handler->canRead();
|
||||
handler->read(&i);
|
||||
|
||||
delete handler;
|
||||
|
||||
return 0;
|
||||
}
|
||||
44
autotests/ossfuzz/prepare_build.sh
Executable file
@ -0,0 +1,44 @@
|
||||
#!/bin/bash -eu
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2018 Google Inc.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
# Based on https://github.com/google/oss-fuzz/blob/33aab4a70dc4b5811143d214536584a8c8cb3924/projects/kimageformats/Dockerfile
|
||||
# Copyright 2018 Google Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
apt-get update && \
|
||||
apt-get install -y cmake make autoconf automake autopoint libtool \
|
||||
wget po4a ninja-build pkgconf
|
||||
|
||||
git clone --depth 1 https://github.com/madler/zlib.git
|
||||
git clone --depth 1 -b v1.5.7 https://github.com/facebook/zstd.git
|
||||
wget https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz
|
||||
git clone https://github.com/tukaani-project/xz.git
|
||||
git clone --depth 1 --branch=RB-3.3 https://github.com/AcademySoftwareFoundation/openexr.git
|
||||
git clone --depth 1 -b master https://invent.kde.org/frameworks/extra-cmake-modules.git
|
||||
git clone --depth 1 --branch=dev git://code.qt.io/qt/qtbase.git
|
||||
git clone --depth 1 --branch=dev git://code.qt.io/qt/qttools.git
|
||||
git clone --depth 1 -b master https://invent.kde.org/frameworks/karchive.git
|
||||
git clone --depth 1 -b v3.12.0 https://aomedia.googlesource.com/aom
|
||||
git clone --depth 1 -b v1.2.1 https://github.com/AOMediaCodec/libavif.git
|
||||
git clone --depth 1 https://github.com/strukturag/libde265.git
|
||||
git clone --depth 1 -b v2.5.3 https://github.com/uclouvain/openjpeg.git
|
||||
git clone --depth 1 https://github.com/strukturag/libheif.git
|
||||
git clone --depth=1 --recursive --shallow-submodules https://github.com/libjxl/libjxl.git
|
||||
git clone --depth 1 https://github.com/LibRaw/LibRaw
|
||||
git clone --depth 1 https://github.com/mircomir/jxrlib.git
|
||||
git clone --depth 1 -b v2.6.0 https://github.com/cisco/openh264.git
|
||||
BIN
autotests/read/avci/eco_kde_gray.avci
Normal file
BIN
autotests/read/avci/eco_kde_gray.png
Normal file
|
After Width: | Height: | Size: 250 KiB |
BIN
autotests/read/avif/metadata.avif
Normal file
|
After Width: | Height: | Size: 18 KiB |
65
autotests/read/avif/metadata.avif.json
Normal file
@ -0,0 +1,65 @@
|
||||
[
|
||||
{
|
||||
"fileName" : "metadata.png",
|
||||
"colorSpace" : {
|
||||
"description" : "sRGB build-in",
|
||||
"primaries" : "SRgb",
|
||||
"transferFunction" : "SRgb",
|
||||
"gamma" : 0
|
||||
},
|
||||
"metadata" : [
|
||||
{
|
||||
"key" : "ModificationDate",
|
||||
"value" : "2025-02-19T08:27:22+01:00"
|
||||
},
|
||||
{
|
||||
"key" : "Software" ,
|
||||
"value" : "GIMP 3.0.0-RC3"
|
||||
},
|
||||
{
|
||||
"key" : "Altitude",
|
||||
"value" : "34"
|
||||
},
|
||||
{
|
||||
"key" : "Author",
|
||||
"value" : "KDE Project"
|
||||
},
|
||||
{
|
||||
"key" : "Copyright",
|
||||
"value" : "@2025 KDE Project"
|
||||
},
|
||||
{
|
||||
"key" : "Description",
|
||||
"value" : "TV broadcast test image."
|
||||
},
|
||||
{
|
||||
"key" : "Latitude",
|
||||
"value" : "44.6478"
|
||||
},
|
||||
{
|
||||
"key" : "LensManufacturer",
|
||||
"value" : "KDE Glasses"
|
||||
},
|
||||
{
|
||||
"key" : "LensModel",
|
||||
"value" : "A1234"
|
||||
},
|
||||
{
|
||||
"key" : "Longitude",
|
||||
"value" : "10.9254"
|
||||
},
|
||||
{
|
||||
"key" : "Manufacturer",
|
||||
"value" : "KFramework"
|
||||
},
|
||||
{
|
||||
"key" : "Model",
|
||||
"value" : "KImageFormats"
|
||||
}
|
||||
],
|
||||
"resolution" : {
|
||||
"dotsPerMeterX" : 11811,
|
||||
"dotsPerMeterY" : 5905
|
||||
}
|
||||
}
|
||||
]
|
||||
BIN
autotests/read/avif/metadata.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
autotests/read/avif/rotated090.avif
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
autotests/read/avif/rotated090.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
autotests/read/avif/rotated090_left-to-right.avif
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
autotests/read/avif/rotated090_left-to-right.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
autotests/read/avif/rotated090_top-to-bottom.avif
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
autotests/read/avif/rotated090_top-to-bottom.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
autotests/read/avif/rotated180.avif
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
autotests/read/avif/rotated180.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
autotests/read/avif/rotated180_left-to-right.avif
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
autotests/read/avif/rotated180_left-to-right.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
autotests/read/avif/rotated180_top-to-bottom.avif
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
autotests/read/avif/rotated180_top-to-bottom.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
autotests/read/avif/rotated270.avif
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
autotests/read/avif/rotated270.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
autotests/read/avif/rotated270_left-to-right.avif
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
autotests/read/avif/rotated270_left-to-right.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
autotests/read/avif/rotated270_top-to-bottom.avif
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
autotests/read/avif/rotated270_top-to-bottom.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
autotests/read/avif/unrotated.avif
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
autotests/read/avif/unrotated.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
autotests/read/avif/unrotated_left-to-right.avif
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
autotests/read/avif/unrotated_left-to-right.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
autotests/read/avif/unrotated_top-to-bottom.avif
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
autotests/read/avif/unrotated_top-to-bottom.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
autotests/read/dds/earth-cubemap.dds
Normal file
2
autotests/read/dds/earth-cubemap.license
Normal file
@ -0,0 +1,2 @@
|
||||
SPDX-FileCopyrightText: Copyright (c) 2006 - 2010 The Open Toolkit library.
|
||||
SPDX-License-Identifier: MIT
|
||||
BIN
autotests/read/dds/earth-cubemap.png
Normal file
|
After Width: | Height: | Size: 956 KiB |
BIN
autotests/read/dds/gray8.dds
Normal file
BIN
autotests/read/dds/gray8.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
autotests/read/dds/indexed.dds
Normal file
BIN
autotests/read/dds/indexed.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
autotests/read/dds/r16.dds
Normal file
BIN
autotests/read/dds/r16.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
autotests/read/dds/r16dx10.dds
Normal file
BIN
autotests/read/dds/r16dx10.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
autotests/read/dds/r32.dds
Normal file
BIN
autotests/read/dds/r32.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
autotests/read/dds/r32dx10.dds
Normal file
BIN
autotests/read/dds/r32dx10.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
autotests/read/dds/rg16.dds
Normal file
BIN
autotests/read/dds/rg16.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
autotests/read/dds/rg16dx10.dds
Normal file
BIN
autotests/read/dds/rg16dx10.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
autotests/read/dds/rg32.dds
Normal file
BIN
autotests/read/dds/rg32.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
autotests/read/dds/rg32dx10.dds
Normal file
BIN
autotests/read/dds/rg32dx10.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
autotests/read/dds/rgba.dds
Normal file
BIN
autotests/read/dds/rgba.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
autotests/read/dds/rgba102.dds
Normal file
BIN
autotests/read/dds/rgba102.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
autotests/read/dds/rgba16dx10.dds
Normal file
7
autotests/read/dds/rgba16dx10.dds.json
Normal file
@ -0,0 +1,7 @@
|
||||
[
|
||||
{
|
||||
"fileName" : "rgba16dx10.png",
|
||||
"fuzziness" : 1,
|
||||
"description" : "Minimum fuzziness value to pass the test on all architectures."
|
||||
}
|
||||
]
|
||||
BIN
autotests/read/dds/rgba16dx10.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
autotests/read/dds/rgba32dx10.dds
Normal file
BIN
autotests/read/dds/rgba32dx10.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
autotests/read/dds/rgba4.dds
Normal file
BIN
autotests/read/dds/rgba4.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
autotests/read/dds/rgba5551.dds
Normal file
BIN
autotests/read/dds/rgba5551.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
autotests/read/dds/rgba_abgr.dds
Normal file
BIN
autotests/read/dds/rgba_abgr.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
autotests/read/dds/rgba_bc1.dds
Normal file
BIN
autotests/read/dds/rgba_bc1.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
autotests/read/dds/rgba_bc2.dds
Normal file
BIN
autotests/read/dds/rgba_bc2.png
Normal file
|
After Width: | Height: | Size: 5.2 KiB |
BIN
autotests/read/dds/rgba_bc3.dds
Normal file
BIN
autotests/read/dds/rgba_bc3.png
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
BIN
autotests/read/dds/rgba_f16.dds
Normal file
13
autotests/read/dds/rgba_f16.dds.json
Normal file
@ -0,0 +1,13 @@
|
||||
[
|
||||
{
|
||||
"fileName" : "rgba_f16.png",
|
||||
"fuzziness" : 1,
|
||||
"description" : "Minimum fuzziness value to pass the test on all architectures.",
|
||||
"colorSpace" : {
|
||||
"description" : "Linear sRGB",
|
||||
"primaries" : "SRgb",
|
||||
"transferFunction" : "Linear",
|
||||
"gamma" : 1
|
||||
}
|
||||
}
|
||||
]
|
||||
BIN
autotests/read/dds/rgba_f16.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
autotests/read/dds/rgba_f32.dds
Normal file
BIN
autotests/read/dds/rgba_f32.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
autotests/read/dds/rgbpa16dx10.dds
Normal file
BIN
autotests/read/dds/rgbpa16dx10.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
autotests/read/dds/rgbpa32dx10.dds
Normal file
BIN
autotests/read/dds/rgbpa32dx10.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
autotests/read/exr/gray.exr
Normal file
BIN
autotests/read/exr/gray.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |