Compare commits

...

76 Commits

Author SHA1 Message Date
Kai Uwe Broulik
0c25cb5b8c Add XCursor image format plug-in
Allows to read XCursor files, including ones with animation.

The cursor hotspot is set in QImage textKeys as "HotspotX" and "HotspotY".
The "Sizes" textKey contains a list of available sizes in this file.
2026-01-30 19:24:56 +01:00
Kai Uwe Broulik
2c8a1ad6ff GIT_SILENT anitest: Fix typo
text -> test
2026-01-30 17:36:12 +01:00
Mirco Miranda
e0f1ba640a IFF: add uncompressed RGFX support 2026-01-27 13:58:01 +01:00
Mirco Miranda
32773e5f0c IFF: add CD-i Rle7 support 2026-01-20 21:17:08 +00:00
Mirco Miranda
2410e45614 Decode Atari ST VDAT chunks 2026-01-20 10:20:32 +01:00
Mirco Miranda
99e4223393 IFF: add support for CD-i YUVS chunk (and minor code improvements) 2026-01-15 16:53:50 +01:00
Mirco Miranda
8224c0099d Add support for CD-I IFF images 2026-01-14 16:53:19 +01:00
Daniel Novomeský
8d7fb2c3fd Add JXL testfile which previously triggered crash 2026-01-11 15:25:03 +01:00
Daniel Novomeský
3353809906 jxl: fix crash on lossy gray images
There was a rare crash during decoding of some lossy gray images.
Problem was reported in https://github.com/libjxl/libjxl/issues/4549
This is a workaround which avoids JxlDecoderSetCms call.
2026-01-11 15:03:06 +01:00
Daniel Novomeský
abf4d32858 Add gray AVIF files with various transfer functions 2026-01-10 20:41:52 +00:00
Daniel Novomeský
6b1c52c55c avif: Improved color profiles support 2026-01-10 20:41:52 +00:00
Albert Astals Cid
e644ab997f GIT_SILENT Upgrade CMake version requirement to 3.27.
See https://community.kde.org/Frameworks/Policies
2026-01-10 00:13:59 +01:00
Nicolas Fella
1fb3363e7b Update version to 6.23.0 2026-01-02 18:59:54 +01:00
Nicolas Fella
19df8b03a8 Update dependency version to 6.22.0 2026-01-02 18:32:32 +01:00
Daniel Novomeský
3f1ee9f9d1 Add YCgCo-Re AVIF test
Disable AVIF read tests for libavif below 1.2.0,
where YCgCo-Re decoding is expected to fail.
2025-12-27 21:35:25 +01:00
Daniel Novomeský
8c9a7e88e5 avif: YCgCo-Re decoding fix 2025-12-26 00:47:46 +00:00
Mirco Miranda
30308f3541 HEIF tests skipped using kde-ci.yml 2025-12-24 17:56:44 +01:00
Laurent Montel
af4597f796 GIT_SILENT: Bump qt ecm_set_disabled_deprecation_versions. Make sure that it compiles fine without qt 6.11 deprecated methods 2025-12-24 06:57:32 +01:00
Laurent Montel
b8b9849268 GIT_SILENT: Bump kf ecm_set_disabled_deprecation_versions. Make sure that it compiles fine without kf 6.21 deprecated methods 2025-12-18 22:07:02 +01:00
Mirco Miranda
db1cb8de1f Add allocation limit test (0/256 MiB) 2025-12-09 15:55:35 +01:00
Albert Astals Cid
956b86c4de allocationLimit = 0 means no limit 2025-12-09 01:06:10 +01:00
Nicolas Fella
282c277204 Update version to 6.22.0 2025-12-05 15:14:46 +01:00
Nicolas Fella
237f25fd20 Update dependency version to 6.21.0 2025-12-05 14:07:10 +01:00
Kunda Ki
5140567853 Fix various typos in the codebase
Fixes mostly source documentation, comments, and some user-facing typos.
Found via `codespell -q 3 -S "*.eps,*.raw" -L ahd,siz,widthn`
2025-12-05 10:41:17 +00:00
Mirco Miranda
72a809bcfd XCF: initialize tiles and buffers 2025-11-22 12:45:46 +01:00
Mirco Miranda
731ac375bb HDR: fix uninitialized buffer 2025-11-22 09:41:25 +01:00
Mirco Miranda
8061500b79 PSD: add support for GrayA (8/16/32 bit) and Gray 32 bit 2025-11-21 06:24:53 +01:00
Mirco Miranda
472ff92b96 PSD: fix use of uninitialized tmp image 2025-11-21 01:21:18 +00:00
Mirco Miranda
847510f109 EXR: fix of uninitialized RGB read buffer 2025-11-20 07:36:49 +01:00
Mirco Miranda
a8ad7be1cd RGB: fix Use-of-uninitialized-value 2025-11-19 11:05:36 +00:00
Mirco Miranda
7202e77c74 HDR: readHeader() sanity checks 2025-11-18 16:56:46 +01:00
Mirco Miranda
379c3c1738 PSD: return error if a complete line is read/decompressed 2025-11-17 14:38:07 +01:00
Nicolas Fella
6519d2930e Update version to 6.21.0 2025-11-14 18:25:25 +01:00
Nicolas Fella
ffcfa49f13 Update dependency version to 6.20.0 2025-11-07 19:26:04 +01:00
Mirco Miranda
d3d4bea2f1 PSD: limit memory usage on corrupted files 2025-11-07 15:36:31 +01:00
Albert Astals Cid
cfbeb397a8 Fix assert on broken data
Change the isnan test to !isfinite. This way we include infinite numbers
too as not accepted
2025-11-05 23:16:03 +01:00
Mirco Miranda
1c6ce2437e PSD: minor fixes while reading Image resource Section 2025-11-03 08:27:17 +01:00
Laurent Montel
3d9f1c4e9e GIT_SILENT: Bump kf ecm_set_disabled_deprecation_versions. Make sure that it compiles fine without kf 6.19 deprecated methods 2025-11-02 16:07:02 +01:00
Mirco Miranda
e7d01c286f IFF: fix crash on malformed files 2025-10-31 09:07:40 +01:00
Albert Astals Cid
dfda863841 iff: Fix crash on malformed files
oss-fuzz/455510771
2025-10-28 00:50:06 +01:00
Mirco Miranda
3d4d74fc02 PSD: improve sections size checks 2025-10-24 08:39:58 +02:00
Mirco Miranda
326e56029a TGA: ignoring large metadata on dev area 2025-10-23 14:54:52 +02:00
Mirco Miranda
e8e5b091bc Check device before read 2025-10-23 12:18:59 +02:00
Mirco Miranda
aeb2988eec Fix possible infinite loop when reading a broken jp2 2025-10-23 11:59:39 +02:00
Mirco Miranda
abfda2ce69 On demand buffer allocation on PCHG decompression 2025-10-23 07:58:58 +00:00
Mirco Miranda
d6d67c7b8b Fix possible read overflow with malformed data 2025-10-23 08:23:57 +02:00
Mirco Miranda
54c94764d1 Fix wrong palette check 2025-10-21 19:33:12 +02:00
Mirco Miranda
7512874620 Use internal FP32 conversion instead of FP16 2025-10-18 05:43:08 +02:00
Mirco Miranda
146f637385 Fix read test failing on aarch64 2025-10-17 13:43:24 +02:00
Albert Astals Cid
436310b4f0 Remove Qt version checks now that 6.8.0 is the minimum required 2025-10-16 20:20:35 +02:00
Albert Astals Cid
d8a8bcb68e GIT_SILENT Upgrade Qt6 version requirement to 6.8.0.
See https://community.kde.org/Frameworks/Policies
2025-10-16 19:10:25 +02:00
Albert Astals Cid
2b80a0a55a Fix assert on broken data
The nan eventually ends up in qRound inside Qt code.
That asserts because it doesn't know what to do with a nan
2025-10-14 23:55:59 +02:00
Albert Astals Cid
8e164474b4 CI: Try newer libjxl for ossfuzz 2025-10-13 11:34:15 +02:00
Albert Astals Cid
4c52480b73 tga: Reduce Warning to Debug
It happens that apps have an unknown source and ask if they can read it,
we should not show a weird warning to the user
2025-10-12 15:14:41 +02:00
Mirco Miranda
19faa55a6d Fix crash on malformed files 2025-10-10 09:03:18 +02:00
Mirco Miranda
b9bfeedbc1 Fix crash on malformed files 2025-10-06 01:04:40 +02:00
Nicolas Fella
3c8539d53d Update version to 6.20.0 2025-10-05 15:16:13 +02:00
Nicolas Fella
d332ad717b Update dependency version to 6.19.0 2025-10-03 15:04:37 +02:00
Albert Astals Cid
1ca7baed98 Fix assert on broken data
The nan eventually ends up in qRound inside Qt code.
That asserts because it doesn't know what to do with a nan
2025-10-02 01:02:08 +02:00
Albert Astals Cid
f1b0c9f0ec add const so we know that QImage is not being modified 2025-10-01 19:15:10 +02:00
Mirco Miranda
b83f4c0231 Add color space check during read test 2025-09-27 11:12:50 +02:00
Mirco Miranda
a457e5ddcb Limits the max RAW size to 300000x300000 pixels 2025-09-21 15:13:17 +02:00
Mirco Miranda
f28cd98661 Limits the max DDS size to 300000x300000 pixels 2025-09-21 11:28:45 +02:00
Jiaqi Wu
05c3a1afe6 Fix compilation failure with Qt 6.7 2025-09-20 13:37:52 +08:00
Mirco Miranda
fda751c641 Switch all plugins to QLoggingCategory 2025-09-19 10:00:26 +02:00
Mirco Miranda
a4e18734bd Resolution calculations performed by functions
Added functions for dpi <-> ppm transformations and used in all plugins.
2025-09-17 12:22:44 +02:00
Azhar Momin
14286a6ab0 Add a CI job for oss-fuzz 2025-09-13 10:15:10 +00:00
Laurent Montel
945fd6f0ce GIT_SILENT: Bump kf ecm_set_disabled_deprecation_versions. Make sure that it compiles fine without kf 6.18 deprecated methods 2025-09-13 08:53:25 +02:00
Albert Astals Cid
c36b4e2350 Use std::lround instead of qRound
qRound will assert if the resulting integer is out of range, by using
lround we can ask if the rounding range failed
2025-09-11 13:50:50 +02:00
Mirco Miranda
95f0d15e14 RAW: Disable broken stream protection
It seems that on BSD the definition introduced with MR !384 crashes Telegram.
2025-09-11 11:52:21 +02:00
Mirco Miranda
56c8bc7323 Add checks on the seek return value 2025-09-09 22:20:34 +02:00
Mirco Miranda
08e178f098 Fix Null-dereference READ 2025-09-09 21:15:19 +02:00
Mirco Miranda
6881e3111b HDR: Limits the header to the first 128 lines
The HDR header is a set of text information spread across a few lines. 
According to the specifications I have, the parameters seem to be a total of 7 / 8 but there could be more. This patch limits the header to 128 lines of maximum 1024 bytes.

Closes #40
2025-09-09 13:59:14 +00:00
Mirco Miranda
463da81fad IFF: support for PCHG chunk
Highlights:
- Adds support for a new palette changer chunk. Some test cases attached to #38 .
- Fixes the reading of ILBMs with the mask (test case: [cyclone.iff](/uploads/d8734d2155fd0d21f7b003b37e0d1259/cyclone.iff)).
- Adds support for HAM5 encoding.
- Adds more test cases created using [HAM Converter](http://mrsebe.bplaced.net/blog/wordpress/).
- Adds support for Atari STE RAST chunk outside FORM one (test case: [fish.iff](/uploads/c461cf4b6a1423cec60fbce645d9fd07/fish.iff)).

NOTE: I contacted Sebastiano Vigna, the author of the PCHG chunk specifications, and he provided me with:
- Some images to test the code (but I can't include them in the test cases).
- Permission to use [his code](https://vigna.di.unimi.it/amiga/PCHGLib.zip) without restrictions: Huffman decompression was achieved by converting `FastDecomp.a` via AI.

Closes #38
2025-09-08 15:39:50 +00:00
Mirco Miranda
8036b1d032 Fix assert when read corrupted floats 2025-09-08 11:01:06 +02:00
Nicolas Fella
71cc137254 Update version to 6.19.0 2025-09-08 10:23:10 +02:00
165 changed files with 4808 additions and 745 deletions

View File

@@ -12,6 +12,7 @@ include:
- /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

View File

@@ -7,5 +7,5 @@ Dependencies:
Options:
test-before-installing: True
require-passing-tests-on: ['Linux', 'FreeBSD', 'Windows']
cmake-options: "-DKIMAGEFORMATS_DDS=ON -DKIMAGEFORMATS_JXR=ON -DKIMAGEFORMATS_HEIF=ON"
cmake-options: "-DKIMAGEFORMATS_JXR=ON -DKIMAGEFORMATS_HEIF=ON -DKIMAGEFORMATS_HEIF_TEST:STRING=OFF -DKIMAGEFORMATS_HEJ2_TEST:STRING=OFF -DKIMAGEFORMATS_AVCI_TEST:STRING=OFF"
per-test-timeout: 90

View File

@@ -1,11 +1,11 @@
cmake_minimum_required(VERSION 3.16)
cmake_minimum_required(VERSION 3.27)
set(KF_VERSION "6.18.0") # handled by release scripts
set(KF_DEP_VERSION "6.18.0") # handled by release scripts
set(KF_VERSION "6.23.0") # handled by release scripts
set(KF_DEP_VERSION "6.22.0") # handled by release scripts
project(KImageFormats VERSION ${KF_VERSION})
include(FeatureSummary)
find_package(ECM 6.18.0 NO_MODULE)
find_package(ECM 6.22.0 NO_MODULE)
set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://commits.kde.org/extra-cmake-modules")
feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES)
@@ -21,7 +21,7 @@ include(ECMDeprecationSettings)
include(CheckIncludeFiles)
include(FindPkgConfig)
set(REQUIRED_QT_VERSION 6.7.0)
set(REQUIRED_QT_VERSION 6.8.0)
find_package(Qt6Gui ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE)
find_package(KF6Archive ${KF_DEP_VERSION})
@@ -65,6 +65,12 @@ set_package_properties(libavif PROPERTIES
option(KIMAGEFORMATS_DDS "Enable plugin for DDS format" ON)
option(KIMAGEFORMATS_HEIF "Enable plugin for HEIF format" OFF)
set(KIMAGEFORMATS_HEIF_TEST "ALL" CACHE STRING "Enable HEIF tests: OFF, READ_ONLY, ALL")
set_property(CACHE KIMAGEFORMATS_HEIF_TEST PROPERTY STRINGS "OFF" "READ_ONLY" "ALL")
set(KIMAGEFORMATS_HEJ2_TEST "ALL" CACHE STRING "Enable HEJ2 tests: OFF, READ_ONLY, ALL")
set_property(CACHE KIMAGEFORMATS_HEJ2_TEST PROPERTY STRINGS "OFF" "READ_ONLY" "ALL")
set(KIMAGEFORMATS_AVCI_TEST "ALL" CACHE STRING "Enable AVCI tests: OFF, ALL")
set_property(CACHE KIMAGEFORMATS_AVCI_TEST PROPERTY STRINGS "OFF" "ALL")
if(KIMAGEFORMATS_HEIF)
pkg_check_modules(LibHeif IMPORTED_TARGET libheif>=1.10.0)
endif()
@@ -99,8 +105,8 @@ 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.17.0
QT 6.11.0
KF 6.21.0
)
add_subdirectory(src)

View File

@@ -229,7 +229,7 @@ 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: n/a
- 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
@@ -247,7 +247,7 @@ limit depends on the format encoding).
- PXR: 65,535 x 65,535 pixels
- QOI: 300,000 x 300,000 pixels
- RAS: 300,000 x 300,000 pixels
- RAW: n/a (depends on the RAW format loaded)
- 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
@@ -290,7 +290,7 @@ 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
- `DDS_DISABLE_STRIDE_ALIGNMENT`: disable the stride alignment based on DDS
pitch: it is known that some writers do not set it correctly.
### The HEIF plugin
@@ -303,6 +303,15 @@ 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.
**If you are interested in compiling the plugin without running the tests,
also use the following string options:**
- `KIMAGEFORMATS_HEIF_TEST` to change the behaviour of HEIF tests. Set to
`"OFF"` (no test at all) or `"READ_ONLY"` (run read tests only).
- `KIMAGEFORMATS_HEJ2_TEST` to change the behaviour of HEJ2 tests. Set to
`"OFF"` (no test at all) or `"READ_ONLY"` (run read tests only)..
- `KIMAGEFORMATS_AVCI_TEST` to change the behaviour of AVCI tests. Set to
`"OFF"` (no test at all).
### The EXR plugin
The following defines can be defined in cmake to modify the behavior of the
@@ -348,9 +357,16 @@ The plugin supports the following image data:
type 4.
- FORM PBM: PBM is a chunky version of IFF pictures. It supports 8-bit images
with color map only.
- FORM IMAG (Compact Disc-Interactive): It supports CLut4, CLut7, CLut8, Rle7
and DYuv formats.
- FORM RGFX: It supports uncompressed images only.
- FOR4 CIMG (Maya Image File Format): It supports 24/48-bit RGB and 32/64-bit
RGBA images.
> [!note]
> The plugin only supports the IFF, ILBM, and LBM file extensions. You'll
> need to rename files with different extensions to open them.
### The JP2 plugin
**This plugin can be disabled by setting `KIMAGEFORMATS_JP2` to `OFF`
@@ -382,7 +398,7 @@ 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
- `JXR_DISABLE_DEPTH_CONVERSION`: remove the needs 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
@@ -414,6 +430,8 @@ PSD support has the following limitations:
- 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.
- Grayscale images with alpha channel or at 32 bit depth are converted to
RGBA due to the lack of the appropriate Qt grayscale container.
- Extra channels other than alpha are discarded.
The following defines can be defined in cmake to modify the behavior of the

View File

@@ -102,36 +102,52 @@ if (KF6Archive_FOUND)
endif()
if (TARGET avif)
kimageformats_read_tests(
avif
)
if(${libavif_VERSION} VERSION_GREATER_EQUAL "1.2.0")
kimageformats_read_tests(
avif
)
else()
message(WARNING "libavif ${libavif_VERSION} doesn't support decoding new AVIF files!\n"
"AVIF read tests are disabled, consider updating libavif.")
endif()
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
if (KIMAGEFORMATS_HEIF_TEST STREQUAL "ALL" OR KIMAGEFORMATS_HEIF_TEST STREQUAL "READ_ONLY")
kimageformats_read_tests(
heif
)
endif()
if (KIMAGEFORMATS_HEIF_TEST STREQUAL "ALL")
# because the plug-ins use RGB->YUV conversion which sometimes results in 1 value difference.
kimageformats_write_tests(FUZZ 1
hej2-nodatacheck-lossless
heif-nodatacheck-lossless
)
endif()
if (LibHeif_VERSION VERSION_GREATER_EQUAL "1.17.0")
if (KIMAGEFORMATS_HEJ2_TEST STREQUAL "ALL" OR KIMAGEFORMATS_HEJ2_TEST STREQUAL "READ_ONLY")
kimageformats_read_tests(FUZZ 1
hej2
)
endif()
if (KIMAGEFORMATS_HEJ2_TEST STREQUAL "ALL")
kimageformats_write_tests(FUZZ 1
hej2-nodatacheck-lossless
)
endif()
endif()
if (LibHeif_VERSION VERSION_GREATER_EQUAL "1.19.6")
kimageformats_read_tests(FUZZ 4
avci
)
if (KIMAGEFORMATS_AVCI_TEST STREQUAL "ALL")
kimageformats_read_tests(FUZZ 4
avci
)
endif()
endif()
endif()
@@ -231,3 +247,8 @@ add_executable(anitest anitest.cpp)
target_link_libraries(anitest Qt6::Gui Qt6::Test)
ecm_mark_as_test(anitest)
add_test(NAME kimageformats-ani COMMAND anitest)
add_executable(xcursortest xcursortest.cpp)
target_link_libraries(xcursortest Qt6::Gui Qt6::Test)
ecm_mark_as_test(xcursortest)
add_test(NAME kimageformats-xcursortest COMMAND xcursortest)

View File

@@ -88,13 +88,17 @@ 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.
- `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
@@ -108,8 +112,8 @@ 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` and
`dotsPerMeterY` (integer) values of the image.
- `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.
@@ -123,6 +127,7 @@ Some examples:
- 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.

View File

@@ -48,7 +48,7 @@ private Q_SLOTS:
QCOMPARE(reader.text(QStringLiteral("Author")), QStringLiteral("KDE Community"));
}
void textRead()
void testRead()
{
QImageReader reader(QFINDTESTDATA("ani/test.ani"));
QVERIFY(reader.canRead());

View File

@@ -38,7 +38,7 @@ 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 --branch v0.11.x --recursive --shallow-submodules https://github.com/libjxl/libjxl.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

View File

@@ -1,6 +1,12 @@
[
{
"fileName" : "metadata.png",
"colorSpace" : {
"description" : "sRGB build-in",
"primaries" : "SRgb",
"transferFunction" : "SRgb",
"gamma" : 0
},
"metadata" : [
{
"key" : "ModificationDate",

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 KiB

View File

@@ -0,0 +1,11 @@
[
{
"fileName" : "profile_gray.png",
"colorSpace" : {
"colorModel" : "Gray",
"primaries" : "Custom",
"transferFunction" : "SRgb",
"gamma" : 2.31
}
}
]

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 KiB

View File

@@ -0,0 +1,11 @@
[
{
"fileName" : "profile_gray_gamma22.png",
"colorSpace" : {
"colorModel" : "Gray",
"primaries" : "Custom",
"transferFunction" : "Gamma",
"gamma" : 2.2
}
}
]

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 KiB

View File

@@ -0,0 +1,11 @@
[
{
"fileName" : "profile_gray_gamma28.png",
"colorSpace" : {
"colorModel" : "Gray",
"primaries" : "Custom",
"transferFunction" : "Gamma",
"gamma" : 2.8
}
}
]

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 KiB

View File

@@ -0,0 +1,11 @@
[
{
"fileName" : "profile_gray_linear.png",
"colorSpace" : {
"colorModel" : "Gray",
"primaries" : "Custom",
"transferFunction" : "Linear",
"gamma" : 1
}
}
]

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 KiB

View File

@@ -0,0 +1,12 @@
[
{
"fileName" : "profile_gray_prophoto.png",
"colorSpace" : {
"description" : "grayscale D50 with ProPhoto TRC",
"colorModel" : "Gray",
"primaries" : "Custom",
"transferFunction" : "Custom",
"gamma" : 0
}
}
]

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

View File

@@ -2,6 +2,12 @@
{
"fileName" : "rgba_f16.png",
"fuzziness" : 1,
"description" : "Minimum fuzziness value to pass the test on all architectures."
"description" : "Minimum fuzziness value to pass the test on all architectures.",
"colorSpace" : {
"description" : "Linear sRGB",
"primaries" : "SRgb",
"transferFunction" : "Linear",
"gamma" : 1
}
}
]

View File

@@ -1,6 +1,12 @@
[
{
"fileName" : "rgb-gimp.png",
"colorSpace" : {
"description" : "",
"primaries" : "Custom",
"transferFunction" : "Linear",
"gamma" : 1
},
"resolution" : {
"dotsPerMeterX" : 3937,
"dotsPerMeterY" : 3937

View File

@@ -1,6 +1,12 @@
[
{
"fileName" : "orientation_all.png",
"colorSpace" : {
"description" : "Linear sRGB",
"primaries" : "SRgb",
"transferFunction" : "Linear",
"gamma" : 1
},
"metadata" : [
{
"key" : "Software" ,

View File

@@ -1,6 +1,12 @@
[
{
"fileName" : "orientation_all.png",
"colorSpace" : {
"description" : "Linear sRGB",
"primaries" : "SRgb",
"transferFunction" : "Linear",
"gamma" : 1
},
"metadata" : [
{
"key" : "Software" ,

View File

@@ -1,6 +1,12 @@
[
{
"fileName" : "orientation_all.png",
"colorSpace" : {
"description" : "Linear sRGB",
"primaries" : "SRgb",
"transferFunction" : "Linear",
"gamma" : 1
},
"metadata" : [
{
"key" : "Software" ,

View File

@@ -1,6 +1,12 @@
[
{
"fileName" : "orientation_all.png",
"colorSpace" : {
"description" : "Linear sRGB",
"primaries" : "SRgb",
"transferFunction" : "Linear",
"gamma" : 1
},
"metadata" : [
{
"key" : "Software" ,

View File

@@ -1,6 +1,12 @@
[
{
"fileName" : "orientation_all.png",
"colorSpace" : {
"description" : "Linear sRGB",
"primaries" : "SRgb",
"transferFunction" : "Linear",
"gamma" : 1
},
"metadata" : [
{
"key" : "Software" ,

View File

@@ -1,6 +1,12 @@
[
{
"fileName" : "orientation_all.png",
"colorSpace" : {
"description" : "Linear sRGB",
"primaries" : "SRgb",
"transferFunction" : "Linear",
"gamma" : 1
},
"metadata" : [
{
"key" : "Software" ,

View File

@@ -1,6 +1,12 @@
[
{
"fileName" : "orientation_all.png",
"colorSpace" : {
"description" : "Linear sRGB",
"primaries" : "SRgb",
"transferFunction" : "Linear",
"gamma" : 1
},
"metadata" : [
{
"key" : "Software" ,

View File

@@ -1,6 +1,12 @@
[
{
"fileName" : "orientation_all.png",
"colorSpace" : {
"description" : "Linear sRGB",
"primaries" : "SRgb",
"transferFunction" : "Linear",
"gamma" : 1
},
"metadata" : [
{
"key" : "Software" ,

View File

@@ -1,6 +1,12 @@
[
{
"fileName" : "metadata.png",
"colorSpace" : {
"description" : "sRGB build-in",
"primaries" : "SRgb",
"transferFunction" : "SRgb",
"gamma" : 0
},
"metadata" : [
{
"key" : "ModificationDate",

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

View File

@@ -0,0 +1,9 @@
[
{
"fileName" : "cdi_dyuv_each.iff",
"resolution" : {
"dotsPerMeterX" : 3937,
"dotsPerMeterY" : 5249
}
}
]

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
autotests/read/iff/ham5.iff Normal file

Binary file not shown.

BIN
autotests/read/iff/ham5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
autotests/read/iff/ham8.iff Normal file

Binary file not shown.

BIN
autotests/read/iff/ham8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

@@ -1,6 +1,12 @@
[
{
"fileName" : "metadata.png",
"colorSpace" : {
"description" : "TICC ICC Profile",
"primaries" : "SRgb",
"transferFunction" : "SRgb",
"gamma" : 0
},
"metadata" : [
{
"key" : "Author",

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

View File

@@ -0,0 +1,37 @@
[
{
"fileName" : "sv5_rgba32_rgx.png",
"colorSpace" : {
"description" : "TIFF ICC Profile",
"primaries" : "SRgb",
"transferFunction" : "SRgb",
"gamma" : 0
},
"metadata" : [
{
"key" : "Author",
"value" : "KDE Project"
},
{
"key" : "Copyright",
"value" : "@2025 KDE Project"
},
{
"key" : "CreationDate",
"value" : "2025-01-14T10:34:51"
},
{
"key" : "Description",
"value" : "TV broadcast test image."
},
{
"key" : "Title",
"value" : "Test Card"
}
],
"resolution" : {
"dotsPerMeterX" : 2835,
"dotsPerMeterY" : 2835
}
}
]

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@@ -1,6 +1,12 @@
[
{
"fileName" : "gimp_exif.png",
"colorSpace" : {
"description" : "sRGB build-in",
"primaries" : "SRgb",
"transferFunction" : "SRgb",
"gamma" : 0
},
"metadata" : [
{
"key" : "ModificationDate",

Binary file not shown.

View File

@@ -0,0 +1,14 @@
[
{
"fileName" : "gray_linear_lossy.png",
"fuzziness" : 1,
"description" : "Minimum fuzziness value to pass the test on all architectures.",
"colorSpace" : {
"description" : "Gra_D65_Rel_SRG",
"primaries" : "Custom",
"transferFunction" : "SRgb",
"gamma" : 0,
"colorModel" : "Gray"
}
}
]

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

View File

@@ -10,6 +10,12 @@
"minQtVersion" : "6.7.3",
"disableAutoTransform": true,
"fileName" : "orientation6_notranfs.png",
"colorSpace" : {
"description" : "GIMP built-in sRGB",
"primaries" : "SRgb",
"transferFunction" : "SRgb",
"gamma" : 0
},
"comment" : "Test with automatic transformation disabled."
},
{

View File

@@ -11,6 +11,12 @@
},
{
"minQtVersion" : "6.6.2",
"colorSpace" : {
"description" : "sRGB built-in",
"primaries" : "SRgb",
"transferFunction" : "SRgb",
"gamma" : 0
},
"fileName" : "testcard_rgba_fp16.png"
},
{

View File

@@ -11,6 +11,12 @@
},
{
"minQtVersion" : "6.6.2",
"colorSpace" : {
"description" : "sRGB built-in",
"primaries" : "SRgb",
"transferFunction" : "SRgb",
"gamma" : 0
},
"fileName" : "testcard_rgba_fp32.png"
},
{

View File

@@ -1,6 +1,12 @@
[
{
"fileName" : "metadata.png",
"colorSpace" : {
"description" : "sRGB build-in",
"primaries" : "SRgb",
"transferFunction" : "SRgb",
"gamma" : 0
},
"metadata" : [
{
"key" : "CreationDate",

View File

@@ -1,6 +1,12 @@
[
{
"fileName" : "orientation_all.png",
"colorSpace" : {
"description" : "GIMP built-in sRGB",
"primaries" : "SRgb",
"transferFunction" : "SRgb",
"gamma" : 0
},
"metadata" : [
{
"key" : "Software" ,

View File

@@ -2,6 +2,13 @@
{
"minQtVersion" : "6.8.0",
"fileName" : "testcard_cmyk8.tif",
"colorSpace" : {
"description" : "U.S. Web Coated (SWOP) v2",
"colorModel" : "Cmyk",
"primaries" : "Custom",
"transferFunction" : "Custom",
"gamma" : 0
},
"resolution" : {
"dotsPerMeterX" : 3780,
"dotsPerMeterY" : 3780

View File

@@ -1,5 +1,11 @@
[
{
"fileName" : "testcard_gray_half.png"
"fileName" : "testcard_gray_half.png",
"colorSpace" : {
"description" : "Linear sRGB",
"primaries" : "SRgb",
"transferFunction" : "Linear",
"gamma" : 1
}
}
]

View File

@@ -0,0 +1,26 @@
[
{
"fileName" : "32bit_grayscale.png",
"colorSpace" : {
"description" : "RGB emulation of \"Linear Grayscale Profile\"",
"colorModel" : "Rgb",
"primaries" : "Custom",
"transferFunction" : "Linear",
"gamma" : 1
},
"metadata" : [
{
"key" : "ModificationDate",
"value" : "2022-03-28T12:46:04"
},
{
"key" : "Software" ,
"value" : "Adobe Photoshop 23.2 (Windows)"
}
],
"resolution" : {
"dotsPerMeterX" : 2232,
"dotsPerMeterY" : 2232
}
}
]

View File

@@ -1,7 +1,14 @@
[
{
"minQtVersion" : "6.8.0",
"fileName" : "cmyk16_testcard_qt6_8.tif"
"fileName" : "cmyk16_testcard_qt6_8.tif",
"colorSpace" : {
"description" : "Coated FOGRA27 (ISO 12647-2:2004)",
"colorModel" : "Cmyk",
"primaries" : "Custom",
"transferFunction" : "Custom",
"gamma" : 0
}
},
{
"minQtVersion" : "6.0.0",

View File

@@ -1,7 +1,14 @@
[
{
"minQtVersion" : "6.8.0",
"fileName" : "cmyk8_testcard_qt6_8.tif"
"fileName" : "cmyk8_testcard_qt6_8.tif",
"colorSpace" : {
"description" : "Coated FOGRA27 (ISO 12647-2:2004)",
"colorModel" : "Cmyk",
"primaries" : "Custom",
"transferFunction" : "Custom",
"gamma" : 0
}
},
{
"minQtVersion" : "6.0.0",

View File

@@ -1,6 +1,12 @@
[
{
"fileName" : "metadata.png",
"colorSpace" : {
"description" : "sRGB build-in",
"primaries" : "SRgb",
"transferFunction" : "SRgb",
"gamma" : 0
},
"metadata" : [
{
"key" : "ModificationDate",

View File

@@ -1,6 +1,12 @@
[
{
"fileName" : "orientation_all.png",
"colorSpace" : {
"description" : "GIMP built-in sRGB",
"primaries" : "SRgb",
"transferFunction" : "SRgb",
"gamma" : 0
},
"metadata" : [
{
"key" : "Software" ,

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

View File

@@ -0,0 +1,26 @@
[
{
"fileName" : "testcard_graya16.png",
"colorSpace" : {
"description" : "RGB emulation of \"Gray Gamma 2.2\"",
"colorModel" : "Rgb",
"primaries" : "SRgb",
"transferFunction" : "Gamma",
"gamma" : 2.19922
},
"metadata" : [
{
"key" : "ModificationDate",
"value" : "2025-11-17T07:27:47"
},
{
"key" : "Software" ,
"value" : "Adobe Photoshop 26.11 (Windows)"
}
],
"resolution" : {
"dotsPerMeterX" : 11811,
"dotsPerMeterY" : 11811
}
}
]

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

View File

@@ -0,0 +1,26 @@
[
{
"fileName" : "testcard_graya32.png",
"colorSpace" : {
"description" : "RGB emulation of \"Profilo scala di grigio lineare\"",
"colorModel" : "Rgb",
"primaries" : "Custom",
"transferFunction" : "Linear",
"gamma" : 1
},
"metadata" : [
{
"key" : "ModificationDate",
"value" : "2025-11-17T07:29:19"
},
{
"key" : "Software" ,
"value" : "Adobe Photoshop 26.11 (Windows)"
}
],
"resolution" : {
"dotsPerMeterX" : 11811,
"dotsPerMeterY" : 11811
}
}
]

Some files were not shown because too many files have changed in this diff Show More