Compare commits

...

124 Commits

Author SHA1 Message Date
1b3d2afbe3 Update dependency version to 6.14.0 2025-05-02 16:02:43 +02:00
850068c1dc JXR: fix compilation error on 32-bit systems 2025-04-22 08:01:02 +02:00
6bf38ea638 Improved EXIF V3 compatibility (2)
This patch improve the string read/write in case of non ASCII encoding.
- When reading, checks for UTF-8 text even on ASCII data type. If it fails, Latin1 converter is used.
- When writing using V3 specs, a better check is done to identify 7-bit ASCII text.

Related to MR !358
2025-04-21 11:29:13 +00:00
2adca7c0ca jxr: Use qsizetype for image size variables
Fixes type mismatch on 32-bit architectures.

/builddir/build/BUILD/kf6-kimageformats-6.13.0-build/kimageformats-6.13.0/src/imageformats/jxr.cpp: In member function ‘virtual bool JXRHandler::read(QImage*)’:
/builddir/build/BUILD/kf6-kimageformats-6.13.0-build/kimageformats-6.13.0/src/imageformats/jxr.cpp:994:88: error: no matching function for call to ‘min(qint64&, qsizetype)’
  994 |                 std::memcpy(img.scanLine(y), ba.data() + convStrideSize * y, (std::min)(convStrideSize, img.bytesPerLine()));
      |                                                                              ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2025-04-21 10:07:00 +02:00
dd69fdaea9 lib prefix on Android
Qt's original qtimageformats plug-ins use lib prefix too,
without the lib prefix, the image plug-ins don't work on Android.
2025-04-19 14:16:18 +00:00
ae62ea3dfc Improved EXIF V3 compatibility
EXIF specs V3 added the UTF-8 data type. The MicroExif class now allows serializations to choose whether to support the V2 or V3 format. To maximize compatibility with old readers, even when V3 is set, the ASCII data type is used if possible.

The JXR plugin, based on TIFF V6 container, does not allow to use the V3 format (it does not recognize the UTF-8 data type) and therefore V2 has been forced. For all other plugins using MicroExif, it is now possible to save, e.g., descriptions in Japanese.

Please note that this patch is also a bugfix: when saving, version 3 was set but the strings were always saved as ASCII.
2025-04-18 13:53:12 +00:00
9c47845f15 Update version to 6.14.0 2025-04-10 19:53:58 +02:00
7c7fa73020 Remove conditions for no longer supported Qt versions 2025-04-08 18:46:13 +02:00
92e4271e84 GIT_SILENT Upgrade Qt6 version requirement to 6.7.0. 2025-04-07 10:13:41 +02:00
6f588c6fd3 Add missing include mocs 2025-04-03 07:34:17 +02:00
a182478e2c It compiles fine without qt6.9 deprecated methods 2025-03-23 22:52:05 +00:00
4026f41890 PSD: use linear profile on float images
On float images, if not color profile is present, a linear one should be chosen. Photoshop works on 32-bit images in a linear color space.
2025-03-23 22:31:23 +00:00
bef2b9168f It compiles fine without kf6.12 deprecated methods 2025-03-22 06:47:20 +01:00
473f5d9847 Write tests for hej2 format 2025-03-16 21:31:46 +01:00
9bee29cc01 heif: enable saving of hej2 format 2025-03-16 18:37:48 +01:00
cdf3be3af1 Update dependency version to 6.13.0 2025-03-14 21:31:42 +01:00
752b18a42c CI: Enable heif so we make sure it compiles 2025-03-12 16:17:29 +00:00
97a1ea181c writetest: special handling for HEIF format 2025-03-12 16:41:39 +01:00
64a43fb04f readtest: special handling for HEIF format 2025-03-12 16:17:59 +01:00
6821c29819 heif: disable AVCI decoder for libheif before 1.19.6 2025-03-12 13:26:42 +01:00
e4d95c03fa SKIP tests when libheif configuration is incomplete 2025-03-10 22:01:14 +01:00
afa8ed1a5d heif: enable reading images with native 16 bit depth 2025-03-10 19:42:34 +01:00
245c835d92 Use of heif_context_add_XMP_metadata instead
heif_context_add_XMP_metadata2
2025-03-09 10:44:18 +01:00
b2663d2651 Update dependency version to 6.13.0 2025-03-07 19:00:23 +01:00
35ab37c628 Update dependency version to 6.12.0 2025-03-07 15:09:18 +01:00
b28baa4a1e sct: qRound with param bigger than max int is undefined
oss-fuzz/399667098
2025-03-04 06:33:52 +00:00
5d2540c135 sct: Use height instead of width when calculating dotsPerMeterY 2025-03-04 06:29:58 +00:00
25cc8bc262 MicroExif: search for the TIFF signature 2025-03-03 09:17:56 +01:00
7742537f8c MicroExif: API improvements and minor bugfixes 2025-03-02 13:34:02 +00:00
d3386bbf50 Fix compilation error 2025-03-02 13:49:25 +01:00
e77986c7e0 Added support for resolution and EXIF/XMP metadata to HEIF 2025-03-02 08:03:28 +00:00
c0261f4926 JXR: Added rotation (transformation) support
- Full rotation support on load and save.
- Improve also Windows compatibility by converting RGB32 to BGR32 on saving

Images saved with orientation are displayed correctly by Windows Explorer (which natively supports JXR files):

![_BC374A2E-7970-4B72-87BD-68DD3D8FB7AA_](/uploads/2268aa3066d82a4f97d026a64f2b70c2/_BC374A2E-7970-4B72-87BD-68DD3D8FB7AA_.png){width=597 height=259}
2025-02-25 21:37:17 +00:00
e5cf9caac5 JXR: added support to EXIF metadata
Improved metadata support via EXIF ​​metadata. Since JXR is based on a TIFF container, EXIF ​​data is read directly from the file so it always works (even with versions of libjxr that don't have the metadata reading API).

It also solves the following issues:
- Incorrect date format on saved JXR files (was saved in ISO format instead of `yyyy:MM:dd HH:mm:ss`).
- Incorrect date type setting in EXIF ​​data: the `DateTime` tag should be updated on every save (verified by GIMP and Photoshop). Our `CreationDate` metadata is the equivalent of the EXIF ​​`DateTimeOriginal` tag.

Closes #22
2025-02-23 00:38:27 +00:00
90d4256f3d AVIF: added support to XMP and EXIF metadata
Allow to load/save info about:
- GPS info (latitude, longitude, altitude)
- Various text info (title, description, author, copyright, etc...)
- Image resolution

The compatibility of the modifications has been tested with GIMP.
2025-02-19 11:56:19 +00:00
bb1c6aab9e Added pixel limit detected by experimental tests 2025-02-17 08:54:49 +01:00
74a734efed jxl: fix build with Qt before 6.8.0 2025-02-15 16:16:10 +01:00
e9fa4b6610 JP2: Disable ICC profile writing when saving an image with OpenJPEG V2.5.3 or lesser and improve the format detection on reading. 2025-02-12 06:45:21 +00:00
36a6ef7d78 heif: improve handling of grayscale ICC profiles 2025-02-10 16:59:49 +00:00
9fd6896cec Improve printing details when writetest fails 2025-02-10 16:59:49 +00:00
9b14e752db Update HEIF writetest templates 2025-02-10 16:59:49 +00:00
90a2e3b412 GIT_SILENT: it compiles fine without kf6.11 deprecated methods 2025-02-10 06:46:22 +01:00
b28cf4c352 Added JXL to CMYK formats 2025-02-07 15:55:23 +01:00
b536ec4a5e Update version to 6.12.0 2025-02-07 15:38:22 +01:00
7d7b295ac2 Update dependency version to 6.11.0 2025-02-07 14:47:25 +01:00
397957a976 jxl: refactor image saving, native CMYK support 2025-02-07 10:38:46 +00:00
18a729f7a1 Harmonized RAW mime types
Modifications based on information found online and the samples [here](https://raw.pixls.us/data).

Created a [MR for shared-mime-info](https://gitlab.freedesktop.org/xdg/shared-mime-info/-/merge_requests/341) with the missing mime types used in this MR.

Closes #19 

NOTE: for the following formats the images are not loaded by LibRAW (so I removed them): ari (ARRI), cap (Casio), lri (Light).
2025-02-07 10:38:26 +00:00
7a74b50d64 imageconverter: possibility to set image quality 2025-02-04 14:42:44 +01:00
0a06a07fa4 Print more details when writetest fails 2025-02-04 10:09:12 +00:00
e89408b426 Fix RAW mime type 2025-01-31 08:32:23 +01:00
8a05711e99 jxl: refactor image loading 2025-01-29 17:02:51 +00:00
d6534f0e68 Add xml/yaml linting 2025-01-29 06:57:55 +01:00
f608441b03 Fix jp2 and hdr plugin json definition
and add a check that the json files are well-formed

i.e. they have the same number of keys than of mimetypes
2025-01-24 14:48:09 +00:00
49060026b7 Read test: added perceptive fuzziness
Added a new parameter to the read tests called `perceptive-fuzz`.
The parameter, when active, modifies the fuzziness value based on the alpha value of the pixel. The more transparent the pixel, the more the fuzziness value increases.

We have found that some image manipulation functions give different results depending on the architecture (we think it is differences in rounding). These differences can become problematic with small alpha values ​​when there are several image conversions from normal alpha to premultiplied alpha (and vice versa).
In particular, the offending plugin is XCF.

The parameter should be set if and only if necessary. CMakeList has not been modified to allow it to be enabled on all format images (you can still try it from the command line). To use it, you need to set it in the JSON file of the image that has problems (after careful analysis).

More info about the issue on #18 

This MR also fixes a bug in `fazzeq()`: it only compared 1/4 of the image.

Below is the same XCF image rendered on AMD64 and PowerPC:

- AMD64:

![image](/uploads/7815ee49fac9b06d08bf1e0e3879f16e/image.png)

- PowerPC:

![image](/uploads/d7432902d638f6caf9589ebb4ad99827/image.png)

The image is visually the same because the differences are with very low alpha and therefore are negligible. The patch proposed with this MR is useful in these cases.
2025-01-24 13:07:32 +00:00
424e7a75de Modified PCX mime type according to IANA db 2025-01-23 08:00:37 +01:00
be534ea06e PSD: Alpha detection improvements
Small fix to improve alpha detection by checking also the Alpha Identifiers.
2025-01-20 22:30:23 +00:00
baaf1093a1 GIT_SILENT: it compiles fine without kf6.10 deprecated methods 2025-01-20 09:53:06 +00:00
e83458a5d8 PSD: improved option support
Added support for the following options:
- `ImageTransformation`: uses EXIF data (same behaviour of Photoshop and GIMP)
- `Description`: uses EXIF data
- `ImageFormat` 

Closes #17
2025-01-18 22:32:15 +00:00
873ec1bb5f More metadata read tests
Adds some metadata/read resolution tests without adding new images.
2025-01-16 23:03:37 +00:00
287a447095 Fix use of deprecated methods 2025-01-16 14:02:44 +01:00
ebb9c1ec18 Metadata and image resolution write test
The goal of MR is to control the correct saving of metadata and resolution in plugins that support them.

- Modified the basic write test to verify that resolution and metadata are saved correctly.
- Verifies the correct functioning of MicroExif in plugins that use it to save metadata.
- EXR: fixed wrong vertical resolution (error found with this MR).
- Added EXR, JXR, JXL, PCX metadata test.
2025-01-16 07:14:27 +00:00
ac3591c7ea PSD: added support to EXIF metadata 2025-01-15 23:26:02 +00:00
a89367dde6 JXR: set max XMP size to 4MiB 2025-01-15 20:36:28 +00:00
65a587afad CI: Add linux-qt6-next build 2025-01-15 19:16:26 +01:00
5f92bcbf26 DDS: Fix warning in qfloat16 and test failure on PowerPC
Fixes the following warning:
```
/home/daniel/kimageformats/src/imageformats/dds.cpp: In function ‘qfloat16 readFloat16(QDataStream&)’:
/home/daniel/kimageformats/src/imageformats/dds.cpp:1037:11: warning: ‘void* memcpy(void*, const void*, size_t)’ copying an object of non-trivial type ‘class qfloat16’ from an array of ‘quint16’ {aka ‘short unsigned int’} [-Wclass-memaccess]
 1037 |     memcpy(&f16, &rawData, sizeof(rawData));
      |     ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/qt6/QtCore/qmetatype.h:14,
                 from /usr/include/qt6/QtCore/qobject.h:18,
                 from /usr/include/qt6/QtCore/qiodevice.h:10,
                 from /usr/include/qt6/QtGui/qimageiohandler.h:9,
                 from /usr/include/qt6/QtGui/QImageIOPlugin:1,
                 from /home/daniel/kimageformats/src/imageformats/dds_p.h:13,
                 from /home/daniel/kimageformats/src/imageformats/dds.cpp:12:
/usr/include/qt6/QtCore/qfloat16.h:46:7: note: ‘class qfloat16’ declared here
   46 | class qfloat16
      |       ^~~~~~~~

```

Should also fixes the following failed tests under PowerPC (32-bits):
```
INFO : rgba16dx10.dds: converting rgba16dx10.dds from RGBA16FPx4 to ARGB32
FAIL : rgba16dx10.dds: differs from rgba16dx10.png
       expected data written to rgba16dx10.dds-expected.data
       actual data written to rgba16dx10.dds-actual.data
```
```
INFO : rgba_f16.dds: converting rgba_f16.dds from RGBA16FPx4 to ARGB32
FAIL : rgba_f16.dds: differs from rgba_f16.png
       expected data written to rgba_f16.dds-expected.data
       actual data written to rgba_f16.dds-actual.data
```
2025-01-15 17:45:57 +00:00
ae00c110f2 JXL: Resolution and metadata support via EXIF
- Added a class to read and write minimal exif metadata.
- JXL plugin uses EXIF metadata to load/save the resolution of the image (like GIMP).
- JXL plugin uses EXIF metadata to set/store text metadata and date/time.
- Enable info display in Dolphin (JXL File -> Properties -> Details on a JXL file, see image below).
- Enabled read test to check also image metadata and resolution.

![_52C044E4-1BA9-4D84-AC0A-B834CDAF72D8_](/uploads/f1649c2b506bf61a5f5488da0d4a4534/_52C044E4-1BA9-4D84-AC0A-B834CDAF72D8_.png){width=401 height=357}
2025-01-15 06:12:07 +00:00
f39ca9dc9b ani: Read chunk elements one at a time instead all at once
This way if the file is malformed and there's not that many elements we don't
try allocate too much memory to read into

BUGS: 498368
2025-01-14 00:40:26 +01:00
f296c38daf xcf: Return early if seek fails
BUGS: 498381
2025-01-09 02:33:51 +00:00
bda8487147 heif: fix -Wstringop-overread warning 2025-01-08 16:45:57 +01:00
bb10c4bd5c jxl: refactor metadata boxes reading 2025-01-08 12:43:42 +01:00
1982557a55 RAW: Allow preview loading
This patch addresses reports of performance issues on large raw collections. Programs that generate previews must use the plugin correctly.

**Setting quality to 0 may return a different image than in the past** (Nothing changes for all other quality values): the plugin loads the embedded thumbnail and, in case of error, decodes the image with quality 1. When compiled with libRAW 0.21+, the plugin automatically select the largest preview from the ones in the file.
2025-01-08 07:01:57 +00:00
c97ee00f5e Add JPEG 2000 support
JPEG 2000 support using OpenJPEG library.

- Add read/write support to JP2/J2K format for Gray/RGB(A)/CMYK images @8/16-bits
- Read test case images generated by Photoshop

The plugin has the following limitations:
- Resolution is not set (JP2_RES box is marked "For the future" in jp2.h)
- Metadata are not set (as with resolution)

Closes #13
2025-01-05 10:36:21 +00:00
e6a0f8758b JXL: Fix missing checks for BOXES when parsing animation
Fix error when parsing something like:

```
JXL_DEC_BOX
JXL_DEC_BOX
JXL_DEC_BOX
JXL_DEC_BASIC_INFO
JXL_DEC_COLOR_ENCODING
JXL_DEC_BOX
JXL_DEC_BOX
JXL_DEC_FRAME
JXL_DEC_BOX
JXL_DEC_FRAME
```

CCBUG: 496350
2025-01-04 06:46:41 +00:00
5c0c7e4fd7 Try writers with different image sizes
Improve the write test by using images with different sizes. By doing this we protect ourselves from line alignment problems (e.g. with 1-bpp images), image size divisors (e.g. power-of-2 divisors), etc...

Pros:
- The test does not add new images but reuses the ones for the format test.

Cons:
- No test are done for read only plugins.

Closes #15
2025-01-03 23:32:06 +00:00
40c2aae0cd Update version to 6.11.0 2025-01-03 16:41:05 +01:00
f49704b2df Update dependency version to 6.10.0 2025-01-03 16:15:48 +01:00
43f3fd05f7 avif: color profiles improvements
With Qt 6.8.x, PQ and HLG transfer functions are supported.
Better support for GRAY profiles
2025-01-02 14:11:55 +01:00
a7cf1a87f9 Update heif.json 2024-12-31 17:33:58 +01:00
fe28130cb3 HEIF plug-in extended to read AVCI format
AVCI is H.264 encapsulated in HEIF container
2024-12-29 23:44:18 +01:00
c0d5b8854b Readme updated with some clarification
- `Contributing` section: `qimageformats module of Qt` changed to `image formats of Qt` because the Qt plugins are also in the core module (e.g. PNG)
- `The HEIF plugin` section: clarified which codec is needed for testing (HEVC)
- Added missing info about EPS, KRA and ORA
- Other minor changes
2024-12-29 07:37:06 +00:00
0b2c6d725d DDS: enable plugin by default
- Enabled the plugin as OSS Fuzz did not find anything yet
- Modified README by adding more info about contributing, DDS plugin and some clarifications

Solves CCBUG: 380956 CCBUG: 389900
2024-12-24 08:59:32 +00:00
894524f7e4 PSD: Added support to MCH1 and MCH2
- Multichannel images are treat as CMYK image when the number of channels are more than 1: when exists, channel 5 is used as alpha. Channels higher than 5 are discarded.
- Multichannel images are treat as Grayscaleimage when the number of channels are equals to 1.
- Device transactions removed (where possible)
- Fix clang-format issues
2024-12-23 23:58:40 +00:00
348ddce987 XCF: Fix OSS Fuzz issue 42527849
Fixes integer overflow when the value is -INT_MAX-1
2024-12-23 22:05:05 +00:00
1cb294545f JXR: Fix loss of HDR data on write for format RGBA16FPx16_Premultiplied
When writing RGBA16FPx16_Premultiplied format, the image was converted to RGBA64 by clamping the float values. With this patch float values ​​outside the range [0, 1] are preserved.
2024-12-23 06:36:39 +00:00
b649cca304 DDS: Fix for OSS Fuzz issue 384974505 2024-12-19 07:18:37 +00:00
adc5c7ae9a DDS: improved read/write support
The following changes have been made:

- Improved writing speed by using scanLine() instead of pixel()
- Optimized memory usage on writing by using ScanlineConverter class
- Added native write support for RGBA32FPx4, RGBA16FPx4, RGB8, Grayscale8 and Indexed8 uncompressed formats
- Grayscale DDS without alpha are loaded in a Grayscale8 image
- Fixed warnings about wrong PITCH reported by GIMP on DDSs saved by this plugin
- Initial support for loading DX10 formats (R16F, RG16F, RGBA16F, RGBPreMulA16F, R32F, RG32F, RGBA32F, RGBPreMulA32F)
- Fixed alignment issues and A8P8 format support of the attached images*

Tested using GIMP and [NVIDIA Texture Tools](https://developer.nvidia.com/texture-tools-exporter) plugin for Photoshop.

(*) The following images (taken from [here](https://github.com/walbourn/directxtexmedia)) cannot be added to read tests due to license issue:
[test8_DWORD.dds](/uploads/449b5a0d886aaf6764af554fe38e2b09/test8_DWORD.dds)
[dx5_logo.dds](/uploads/6f5f27df752890b227ef07e0195435d4/dx5_logo.dds)
[test888_DWORD.dds](/uploads/c8bc355c5749cf203d47e0b3073ad419/test888_DWORD.dds)
2024-12-17 23:08:43 +00:00
a6f7482957 Read / Write test: added NULL device test
DDS plugin crashes if I request supportedSubTypes()

- Fixed DDS plugin crash
- Added NULL device test on both read and write tests

Closes #14
2024-12-16 13:52:06 +00:00
d91c7dd912 DDS: multiple FP improvements
- Use of native qfloat16 format
- FP16 and FP32 HDR images are preserved and sRGB Linear profile is set
- Images are always saved as 8-bit so, if valid profile is present the image is converted to sRGB 
- It also fixes (left image) a problem (right image) with HDR images:
![_DF316651-18AF-498F-8689-B3613F8C9D45_](/uploads/f5deb9bff6d22dae94ecf7942d8fd806/_DF316651-18AF-498F-8689-B3613F8C9D45_.png){width=281 height=157}![_AF65379D-E6A5-4007-863D-7B60EDFB7383_](/uploads/92460f2dabbb763061f6e6143bc36719/_AF65379D-E6A5-4007-863D-7B60EDFB7383_.png){width=271 height=169}
2024-12-12 22:07:07 +00:00
86865223d2 PFM: fix error when loading images with comments
I tested the plugin with the images stored [here](https://github.com/walbourn/directxtexmedia). It contains PFM and PHM images but I didn't find any license on the repo, so the images was not added to test cases.

I attach here the images that this patch allows to load:
[grad4d_mono.pfm](/uploads/6e41fcb64d0651a6abd78cffc5ff86b2/grad4d_mono.pfm)
[grad4d_mono.phm](/uploads/348a51476068aa344f67826006cb65c4/grad4d_mono.phm)
[grad4d.phm](/uploads/2ab8330466f4dd0fc2fda00711270ce9/grad4d.phm)
2024-12-12 09:48:34 +00:00
ecbcf3b7f4 DDS: fix buffer overflow in readCubeMap
The issue was identified by OSS Fuzz and the feature was not covered by our tests.

- Added earth-cubemap.dds under MIT licenses taken from [Open Toolkit library](https://github.com/mono/opentk/tree/main/Source/Examples/Data/Textures)
- Fix a wrong image size returned by a cubemap image
- Read test skips .license files
2024-12-12 09:42:24 +00:00
87eff569a4 Re-added DDS plugin support
Fork of [Qt 5.6 DDS plugin](https://code.qt.io/cgit/qt/qtimageformats.git/tree/src/plugins/imageformats/dds/qddshandler.cpp?h=5.6) under LGPL2.1.

- Merged all files in dds_p.h and dds.cpp
- Added support for Qt 6 image allocation limit
- Added checks for null image and datastream errors
- The plugin is disabled by default

CCBUG: 380956

Closes: #12
2024-12-11 06:45:00 +00:00
a531978e2a Update version to 6.10.0 2024-12-06 16:07:49 +01:00
ceb1c46fea Update dependency version to 6.9.0 2024-12-06 12:41:46 +01:00
6558b3255a jxl: Disable color conversion for animations
Workaround for issue https://github.com/libjxl/libjxl/issues/3983
libjxl_cms is used for color conversion of lossy static images.
Fix loading of lossy grayscale images
Fix loading of grayscale images with odd width
2024-11-30 23:18:06 +01:00
374961dab4 Improve CMYK writing support
Closes #11 

Requires MR !279

On formats that does not support CMYK and does not use the ScanLineConverter class during write operation, the CMYK images must be converted using the color space conversion functions of `QImage` (if ICC profile is valid).
2024-11-28 06:57:01 +00:00
b5d8b6638e Improved write test
Closes #10 

Added image format test: I pass every image format supported by QImage (except Alpha8) to the plugin and check the result.
2024-11-28 06:52:15 +00:00
92a1752c1f JXL: load error with some lossless file
When loading lossless JXL images without ICC profile, the parser failed.
The problem was caused by Boxes being enabled (MR !250). The parser should probably be revised to be more flexible.

CCBUG: 496350
2024-11-20 16:34:00 +00:00
9f05ecb523 JXR: jxrlib cannot write HDP and WDP formats
According with JXRLib GetIIDInfo(), HDP and WPD formats are read only.
```
    static PKIIDInfo iidInfo[] = {
        {".jxr", &IID_PKImageWmpEncode, &IID_PKImageWmpDecode},
        {".wdp", &IID_PKImageUnsupported, &IID_PKImageWmpDecode},
        {".hdp", &IID_PKImageUnsupported, &IID_PKImageWmpDecode},
    };
```
2024-11-19 13:52:15 +00:00
28c4ceeba9 heif: avoid crash in heif_image_handle_has_alpha_channel
Try to load Xiaomi images with non-strict decoding second time.
2024-11-17 15:17:13 +01:00
f029a4a8ed Bump KF and QT versions in ecm_set_disabled_deprecation_versions 2024-11-17 10:52:09 +01:00
56f229a2f1 GIT_SILENT Upgrade Qt6 version requirement to 6.6.0. 2024-11-13 21:41:34 +01:00
72d4c41415 ci: add Alpine/musl job 2024-11-12 15:53:28 +01:00
4923e2ecaa RGB: avoid to read wrong data
Should fixes OSS Fuzz issue 42538251
2024-11-11 23:06:49 +00:00
b645c9c258 JXL: Fix OSS Fuzz issue 377971416 2024-11-09 10:44:04 +00:00
8265b3602b Fix compilation warnings
Fixed warnings reported by CIs in our code.
2024-11-07 22:10:11 +00:00
dbd439bd98 JXR: Fix libraries link under FreeBSD
JXR libraries are finally inside FreeBSD CI machines. In fact he stopped building.
2024-11-07 06:55:28 +00:00
a664baa9f9 JXL: fixed bug when saving grayscale images without color profile
Saving grayscale images at less than 100% quality made the file unreadable.
Fix also a regression while loading GrayA images introduced with MR !250
2024-11-06 21:15:04 +00:00
c38a1a0248 PFM: extended to half float format
The Portable HalfMap is a format supported by ImageMagick. The test cases was generated by converting pfm to phm using ImageMagick: `convert image.pfm image.phm`.
2024-11-06 21:12:05 +00:00
2ea724c241 Rename SCT plugin for OSS-FUZZ
To make OSS fuzz build script happy, the test folder and the cpp file must have the same name.
2024-11-05 12:17:52 +00:00
ecfbff8197 PCX: support for more formats
Added support for:
- (R/O) 1 bit, 3 planes (ICONDOC.pcx) -> test case from internet archive
- (R/O) 2 bits, 1 planes (CGA_FSD.pcx) -> test case from internet archive
- (R/W) 8 bits, 4 planes (dice_rgba.pcx) -> supported by ImageMagick and GIMP 3

Fix write support for:
- Grayscale 8/16-bits (saved as indexed)
- Alpha 8 (saved as indexed)
- RGB 16-bits depth (saved as RGB 24/32)
2024-11-05 06:36:18 +00:00
4dedd88c08 SCT: added read only support
I keep adding old formats to ensure interoperability with as many programs as possible...

This plugin adds read-only support for the Scitex SCT format only. This format is also supported by Photoshop in read and write (SCT test cases were created by Photoshop).

[Scitex HandShake Formats Specifications](/uploads/a3e213e48349d898b260375d6c052521/Scitex_HandShake_Formats.pdf)
2024-11-04 13:05:59 +00:00
d233e80dbb Update version to 6.9.0 2024-11-02 17:04:01 +01:00
799ac37660 Update dependency version to 6.8.0 2024-11-02 16:13:04 +01:00
0378bd67e1 TGA: Fixed GrayA image loading error
Gray TGA images with alpha were loading incorrectly and tests did not detect the error since the BW(A).TGA images were actually RGB(A) images.
2024-10-24 15:07:44 +00:00
7d696a81d2 exr: Fix read/write with openexr 3.3
It really wants to have a filename

Also it uses seek and tell a lot so sequential devices are for now not
supported

BUGS: 494571
2024-10-12 01:47:22 +02:00
b5d5abe0ea JXL improvements
Highlights of the patch:
- Supersede MR !249
- Added FP16 and FP32 images support thus preserving HDR values (read / write, required libjxl 0.9+).
- Added Gray8 and Gray16 support (read / write).
- Indexed images are saved as Gray8 when palette is gray scale.
- Binary images are saved as Gray8 (does JXL natively support binary images?).
- Simplified writing process by partially removing the use of additional buffers.
- Added XMP metadata support by decoding/encoding Boxes.
- Changed maximum image size in pixels in accordance with JXL feature level 5 (still limited to 256 megapixels).

Compatibility: 
- Older versions of this plugin load FP images correctly as UINT16 (obviously losing HDR info).
- HDR images saved with this patch are also loaded correctly by Gimp and Photoshop.
- Grayscale images saved with this patch are also loaded correctly by Gimp and Photoshop.

Compilation modifiers for cmake file:
- `JXL_HDR_PRESERVATION_DISABLED`: disable the FP support (behaves like previous versions).
- `JXL_DECODE_BOXES_DISABLED`: disable metadata reading (behaves like previous versions).
2024-10-11 12:42:42 +00:00
3f4690d1e9 Update version to 6.8.0 2024-10-11 13:35:32 +02:00
ac1006cc66 JXR: Fixed image reading on sequential devices
The following changes are done:
- Fixed an error when copying image from sequential device
- Return error when the image exceed 4GB size on writing*
- Enabled JXR tests

(*) Note that when writing an image larger than 4GiB, the JXRLib does not give any error but the resulting saved image id wrong.
2024-10-09 21:34:32 +00:00
97120b2537 Simplified read/verify header process
Where possible, QIODevice::peek has been used instead of transactions or instead of using ungetchar() for sequential access devices and seek() for random access devices.

Furthermore:
- RAS format gained the ability of read on sequential devices.
- Removed unused code in XCF (still related to ungetchar and sequential devices).
- These changes should prevent errors like the ones fixed by MR !258
2024-10-06 17:26:25 +00:00
fee0165bef Update dependency version to 6.7.0 2024-10-04 16:57:57 +02:00
ae641f7e94 Fix endianness bug in PCX reader on big endian architectures
When reading from a sequential device, the peekHeader() method in
the PCX readers reads the header its defined little endian into
arch-specific endianness for multibyte types.

Being a "peek" method, it then it tries to push back the bytes into
the device after reading for its next use, but it doesn’t convert
multibyte types correctly from arch-specifice endianness to the
initial little endian format.

Subsequent reading of the data from the device will thus lead to
incorrect values for multibyte types on the next use.

This patch reuses the same technique as the TGA reader to read the
whole header as bytes before deserializing it, so that the bytes
can be pushed back into the sequential device in the same order.
2024-09-22 01:31:13 +02:00
46f7b90ce6 Fixed read of BGR32 and RGB555 formats 2024-09-16 17:16:28 +02:00
f7c8eaa140 FIxed comparison of unsigned expression
Fix of [Issue 9](https://invent.kde.org/frameworks/kimageformats/-/issues/9)

Same of MR !253 to solve the `Fix of [Issue 9](https://invent.kde.org/frameworks/kimageformats/-/issues/9)` when rebasing.
2024-09-15 15:00:11 +00:00
36bfee8ae3 raw: Getting the image size does not need unpacking
According to the libraw documentation, the sizes are available directly
after open_datastream.
2024-09-13 19:17:31 +02:00
e2aaf89ec5 Update version to 6.7.0 2024-09-06 14:21:04 +02:00
777 changed files with 77753 additions and 1254 deletions

2
.gitattributes vendored
View File

@ -11,3 +11,5 @@ autotests/read/hdr/fake_earth.hdr binary
autotests/read/hdr/rgb.hdr binary autotests/read/hdr/rgb.hdr binary
autotests/read/hdr/rgb-landscape.hdr binary autotests/read/hdr/rgb-landscape.hdr binary
autotests/read/hdr/rgb-portrait.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

View File

@ -5,6 +5,18 @@ include:
- project: sysadmin/ci-utilities - project: sysadmin/ci-utilities
file: file:
- /gitlab-templates/linux-qt6.yml - /gitlab-templates/linux-qt6.yml
- /gitlab-templates/linux-qt6-next.yml
- /gitlab-templates/alpine-qt6.yml
- /gitlab-templates/android-qt6.yml - /gitlab-templates/android-qt6.yml
- /gitlab-templates/freebsd-qt6.yml - /gitlab-templates/freebsd-qt6.yml
- /gitlab-templates/windows-qt6.yml - /gitlab-templates/windows-qt6.yml
- /gitlab-templates/xml-lint.yml
- /gitlab-templates/yaml-lint.yml
image_json_validate:
stage: validate
image: invent-registry.kde.org/sysadmin/ci-images/suse-qt68: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"

View File

@ -1,9 +1,11 @@
Dependencies: Dependencies:
- 'on': ['Linux', 'FreeBSD', 'macOS', 'Windows', 'Android'] - 'on': ['Linux', 'FreeBSD', 'macOS', 'Windows', 'Android']
'require': 'require':
'frameworks/extra-cmake-modules': '@same' 'frameworks/extra-cmake-modules': '@same'
'frameworks/karchive' : '@same' 'frameworks/karchive': '@same'
Options: Options:
test-before-installing: True test-before-installing: True
require-passing-tests-on: [ 'Linux', 'FreeBSD', 'Windows' ] require-passing-tests-on: ['Linux', 'FreeBSD', 'Windows']
cmake-options: "-DKIMAGEFORMATS_DDS=ON -DKIMAGEFORMATS_JXR=ON -DKIMAGEFORMATS_HEIF=ON"
per-test-timeout: 90

View File

@ -1,11 +1,11 @@
cmake_minimum_required(VERSION 3.16) cmake_minimum_required(VERSION 3.16)
set(KF_VERSION "6.6.0") # handled by release scripts set(KF_VERSION "6.14.0") # handled by release scripts
set(KF_DEP_VERSION "6.6.0") # handled by release scripts set(KF_DEP_VERSION "6.14.0") # handled by release scripts
project(KImageFormats VERSION ${KF_VERSION}) project(KImageFormats VERSION ${KF_VERSION})
include(FeatureSummary) include(FeatureSummary)
find_package(ECM 6.6.0 NO_MODULE) find_package(ECM 6.14.0 NO_MODULE)
set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://commits.kde.org/extra-cmake-modules") 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) feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES)
@ -21,7 +21,7 @@ include(ECMDeprecationSettings)
include(CheckIncludeFiles) include(CheckIncludeFiles)
include(FindPkgConfig) include(FindPkgConfig)
set(REQUIRED_QT_VERSION 6.5.0) set(REQUIRED_QT_VERSION 6.7.0)
find_package(Qt6Gui ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE) find_package(Qt6Gui ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE)
find_package(KF6Archive ${KF_DEP_VERSION}) find_package(KF6Archive ${KF_DEP_VERSION})
@ -62,6 +62,8 @@ set_package_properties(libavif PROPERTIES
PURPOSE "Required for the QImage plugin for AVIF images" 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) option(KIMAGEFORMATS_HEIF "Enable plugin for HEIF format" OFF)
if(KIMAGEFORMATS_HEIF) if(KIMAGEFORMATS_HEIF)
pkg_check_modules(LibHeif IMPORTED_TARGET libheif>=1.10.0) pkg_check_modules(LibHeif IMPORTED_TARGET libheif>=1.10.0)
@ -70,17 +72,26 @@ add_feature_info(LibHeif LibHeif_FOUND "required for the QImage plugin for HEIF/
option(KIMAGEFORMATS_JXL "Enable plugin for JPEG XL format" ON) option(KIMAGEFORMATS_JXL "Enable plugin for JPEG XL format" ON)
if(KIMAGEFORMATS_JXL) if(KIMAGEFORMATS_JXL)
pkg_check_modules(LibJXL IMPORTED_TARGET libjxl>=0.7.0) pkg_check_modules(LibJXL IMPORTED_TARGET libjxl>=0.9.4)
pkg_check_modules(LibJXLThreads IMPORTED_TARGET libjxl_threads>=0.7.0) pkg_check_modules(LibJXLThreads IMPORTED_TARGET libjxl_threads>=0.9.4)
pkg_check_modules(LibJXLCMS IMPORTED_TARGET libjxl_cms>=0.9.4)
endif() endif()
add_feature_info(LibJXL LibJXL_FOUND "required for the QImage plugin for JPEG XL images") add_feature_info(LibJXL LibJXL_FOUND "required for the QImage plugin for JPEG XL images")
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) find_package(LibRaw 0.20.2)
set_package_properties(LibRaw PROPERTIES set_package_properties(LibRaw PROPERTIES
TYPE OPTIONAL TYPE OPTIONAL
PURPOSE "Required for the QImage plugin for RAW images" 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) option(KIMAGEFORMATS_JXR "Enable plugin for JPEG XR format" OFF)
if(KIMAGEFORMATS_JXR) if(KIMAGEFORMATS_JXR)
find_package(LibJXR) find_package(LibJXR)
@ -88,8 +99,8 @@ endif()
add_feature_info(LibJXR LibJXR_FOUND "required for the QImage plugin for JPEG XR images") add_feature_info(LibJXR LibJXR_FOUND "required for the QImage plugin for JPEG XR images")
ecm_set_disabled_deprecation_versions( ecm_set_disabled_deprecation_versions(
QT 6.5 QT 6.9.0
KF 5.102 KF 6.12.0
) )
add_subdirectory(src) add_subdirectory(src)

269
README.md
View File

@ -1,6 +1,7 @@
# KImageFormats # 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 ## Introduction
@ -19,16 +20,19 @@ The following image formats have read-only support:
- Krita (kra) - Krita (kra)
- OpenRaster (ora) - OpenRaster (ora)
- Pixar raster (pxr) - Pixar raster (pxr)
- Portable FloatMap (pfm) - Portable FloatMap/HalfMap (pfm, phm)
- Photoshop documents (psd, psb, pdd, psdt) - Photoshop documents (psd, psb, pdd, psdt)
- Radiance HDR (hdr) - Radiance HDR (hdr)
- Scitex CT (sct)
- Sun Raster (im1, im8, im24, im32, ras, sun) - Sun Raster (im1, im8, im24, im32, ras, sun)
The following image formats have read and write support: 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) - Encapsulated PostScript (eps)
- High Efficiency Image File Format (heif) - High Efficiency Image File Format (heif)
- JPEG 2000 (jp2, j2k, jpf)
- JPEG XL (jxl) - JPEG XL (jxl)
- JPEG XR (jxr) - JPEG XR (jxr)
- OpenEXR (exr) - OpenEXR (exr)
@ -40,16 +44,22 @@ The following image formats have read and write support:
## Contributing ## Contributing
See the [`QImageIOPlugin`](https://doc.qt.io/qt-6/qimageioplugin.html) documentation for information on how to write a See the [`QImageIOPlugin`](https://doc.qt.io/qt-6/qimageioplugin.html)
new plugin. documentation for information on how to write a new plugin.
The main difference between this framework and the qimageformats module The main difference between this framework and the image formats of Qt is
of Qt is the license. As such, if you write an imageformat plugin and the license. As such, if you write an image format plugin and you are
you are willing to sign the Qt Project contributor agreement, it may be willing to sign the Qt Project contributor agreement, it may be better to
better to submit the plugin directly to the Qt Project. submit the plugin directly to the Qt Project.
To be accepted, contributions must:
- Contain the test images needed to verify that the changes work correctly
- Pass the tests successfully
## Duplicated Plugins ## Duplicated Plugins
### The TGA plugin
The TGA plugin supports more formats than Qt's own TGA plugin; The TGA plugin supports more formats than Qt's own TGA plugin;
specifically, the one provided here supports indexed, greyscale and RLE 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 images (types 1-3 and 9-11), while Qt's plugin only supports type 2
@ -60,6 +70,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 TGA plugin, it would allow the TGA plugin in this framework to be
removed. 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 ## License
This framework is licensed under the This framework is licensed under the
@ -70,16 +92,17 @@ The CMake code in this framework is licensed under the
## Plugin status ## Plugin status
The current implementation of a plugin may not be complete or may have limitations The current implementation of a plugin may not be complete or may have
of various kinds. Typically the limitations are on maximum size and color depth. 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. 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. For example, native support for CMYK images is only available since Qt 6.8.
### HDR images ### HDR images
HDR images are supported via floating point image formats from EXR, HDR, JXR, HDR images are supported via floating point image formats from DDS, EXR, HDR,
PFM and PSD plugins. JXL, JXR, PFM and PSD plugins.
It is important to note that in the past these plugins stripped away HDR It is important to note that in the past these plugins stripped away HDR
information, returning SDR images. information, returning SDR images.
@ -90,16 +113,95 @@ clamp). This is not a plugin issue.
### Metadata ### Metadata
Metadata support is implemented in all formats that support it. In particular, Metadata support is available in formats that include it via
in addition to the classic `"Description"`, `"Author"`, `"Copyright"`, etc... where `QImage::setText()` and `QImage::text()`. To ensure consistent metadata
possible, XMP data is supported via the `"XML:com.adobe.xmp"` key. functionality, the following keys have been adopted.
Please note that only the most common metadata is supported. 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
ICC support is fully implemented in all formats that support it. When saving, ICC profile support is implemented in all formats that handle them using
some formats convert the image using color profiles according to [`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 specifications. In particular, HDR formats almost always convert to linear
RGB. RGB.
@ -113,11 +215,16 @@ plugin ('n/a' means no limit, i.e. the limit depends on the format encoding).
- ANI: n/a - ANI: n/a
- AVIF: 32,768 x 32,768 pixels, in any case no larger than 256 megapixels - AVIF: 32,768 x 32,768 pixels, in any case no larger than 256 megapixels
- DDS: n/a
- EXR: 300,000 x 300,000 pixels - EXR: 300,000 x 300,000 pixels
- EPS: n/a
- HDR: n/a (large image) - HDR: n/a (large image)
- HEIF: n/a - HEIF: n/a
- JXL: 65,535 x 65,535 pixels, in any case no larger than 256 megapixels - JP2: 300,000 x 300,000 pixels, in any case no larger than 2 gigapixels
- JXR: n/a - JXL: 262,144 x 262,144 pixels, in any case no larger than 256 megapixels
- JXR: n/a, 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 - PCX: 65,535 x 65,535 pixels
- PFM: n/a (large image) - PFM: n/a (large image)
- PIC: 65,535 x 65,535 pixels - PIC: 65,535 x 65,535 pixels
@ -127,6 +234,7 @@ plugin ('n/a' means no limit, i.e. the limit depends on the format encoding).
- RAS: n/a (large image) - RAS: n/a (large image)
- RAW: n/a (depends on the RAW format loaded) - RAW: n/a (depends on the RAW format loaded)
- RGB: 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 - TGA: 65,535 x 65,535 pixels
- XCF: 300,000 x 300,000 pixels - XCF: 300,000 x 300,000 pixels
@ -157,52 +265,125 @@ been used or the maximum size of the image that can be saved has been limited.
PSD plugin loads CMYK, Lab and Multichannel images and converts them to RGB PSD plugin loads CMYK, Lab and Multichannel images and converts them to RGB
without using the ICC profile. without using the ICC profile.
JXR and PSD plugins natively support 4-channel CMYK images when compiled JP2, JXL, JXR, PSD and SCT plugins natively support 4-channel CMYK images when
with Qt 6.8+. 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 ### The HEIF plugin
**This plugin is disabled by default. It can be enabled with the **This plugin is disabled by default. It can be enabled by settings
`KIMAGEFORMATS_HEIF` build option in the cmake file.** `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 EXR plugin
The following defines can be defined in cmake to modify the behavior of the plugin: The following defines can be defined in cmake to modify the behavior of the
- `EXR_CONVERT_TO_SRGB`: the linear data is converted to sRGB on read to accommodate programs that do not support color profiles. plugin:
- `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. - `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 HDR plugin
The following defines can be defined in cmake to modify the behavior of the plugin: The following defines can be defined in cmake to modify the behavior of the
- `HDR_HALF_QUALITY`: on read, a 16-bit float image is returned instead of a 32-bit float one. plugin:
- `HDR_HALF_QUALITY`: on read, a 16-bit float image is returned instead of a
32-bit float one.
### 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 JXL plugin
**The current version of the plugin limits the image size to 256 megapixels **The current version of the plugin limits the image size to 256 megapixels
according to feature level 5 of the JXL stream encoding.** 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 ### The JXR plugin
**This plugin is disabled by default. It can be enabled with the **This plugin is disabled by default. It can be enabled by settings
`KIMAGEFORMATS_JXR` build option in the cmake file.** `KIMAGEFORMATS_JXR` to `ON` in your cmake options.**
The following defines can be defined in cmake to modify the behavior of the plugin: The following defines can be defined in cmake to modify the behavior of the
- `JXR_DENY_FLOAT_IMAGE`: disables the use of float images and consequently any HDR data will be lost. plugin:
- `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_DENY_FLOAT_IMAGE`: disables the use of float images and consequently
- `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. any HDR data will be lost.
- `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. - `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 ### The PSD plugin
PSD support has the following limitations: PSD support has the following limitations:
- Only images saved by Photoshop using compatibility mode enabled (Photoshop default) can be decoded. - Only images saved by Photoshop using compatibility mode enabled (Photoshop
- Multichannel images are treated as CMY/CMYK and are only loaded if they have 3 or more channels. 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. - Duotone images are treated as grayscale images.
- Extra channels other than alpha are discarded. - Extra channels other than alpha are discarded.
The following defines can be defined in cmake to modify the behavior of the plugin: The following defines can be defined in cmake to modify the behavior of the
- `PSD_FAST_LAB_CONVERSION`: the LAB image is converted to linear sRGB instead of sRGB which significantly increases performance. plugin:
- `PSD_NATIVE_CMYK_SUPPORT_DISABLED`: disable native support for CMYK images when compiled with Qt 6.8+ - `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 ### The RAW plugin
@ -217,7 +398,9 @@ The default setting tries to balance quality and conversion speed.
### The XCF plugin ### The XCF plugin
XCF support has the following limitations: 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). - 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. - The returned image is always 8-bit.
- Cannot read zlib compressed files. - Cannot read zlib compressed files.
- The rendered image may be slightly different (colors/transparencies) than in GIMP. - The rendered image may be slightly different (colors/transparencies) than
in GIMP.

View File

@ -19,9 +19,15 @@ macro(kimageformats_read_tests)
endif() endif()
foreach(_testname ${KIF_RT_UNPARSED_ARGUMENTS}) 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( add_test(
NAME kimageformats-read-${_testname} NAME kimageformats-read-${_testname}
COMMAND readtest ${_fuzzarg} ${_testname} COMMAND readtest ${skip_optional_arg} ${_fuzzarg} ${_testname}
) )
endforeach(_testname) endforeach(_testname)
endmacro() endmacro()
@ -43,6 +49,8 @@ macro(kimageformats_write_tests)
foreach(_testname ${KIF_RT_UNPARSED_ARGUMENTS}) foreach(_testname ${KIF_RT_UNPARSED_ARGUMENTS})
string(REGEX MATCH "-lossless$" _is_lossless "${_testname}") string(REGEX MATCH "-lossless$" _is_lossless "${_testname}")
string(REGEX MATCH "-nodatacheck" _is_no_data_check "${_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(lossless_arg)
unset(no_data_check_arg) unset(no_data_check_arg)
if (_is_lossless) if (_is_lossless)
@ -53,9 +61,13 @@ macro(kimageformats_write_tests)
set(no_data_check_arg "--no-data-check") set(no_data_check_arg "--no-data-check")
string(REGEX REPLACE "-nodatacheck$" "" _testname "${_testname}") string(REGEX REPLACE "-nodatacheck$" "" _testname "${_testname}")
endif() endif()
if (_is_skip_optional)
set(skip_optional_arg "--skip-optional-tests")
string(REGEX REPLACE "-skipoptional$" "" _testname "${_testname}")
endif()
add_test( add_test(
NAME kimageformats-write-${_testname} NAME kimageformats-write-${_testname}
COMMAND writetest ${lossless_arg} ${no_data_check_arg} ${_fuzzarg} ${_testname} COMMAND writetest ${lossless_arg} ${no_data_check_arg} ${skip_optional_arg} ${_fuzzarg} ${_testname}
) )
endforeach(_testname) endforeach(_testname)
endmacro() endmacro()
@ -72,9 +84,15 @@ kimageformats_read_tests(
qoi qoi
ras ras
rgb rgb
sct
tga tga
) )
if(KIMAGEFORMATS_DDS)
kimageformats_read_tests(dds)
kimageformats_write_tests(dds-nodatacheck-lossless)
endif()
if (KF6Archive_FOUND) if (KF6Archive_FOUND)
kimageformats_read_tests( kimageformats_read_tests(
kra kra
@ -104,16 +122,46 @@ if (LibHeif_FOUND)
kimageformats_read_tests(FUZZ 1 kimageformats_read_tests(FUZZ 1
hej2 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()
endif() endif()
if (LibJXL_FOUND AND LibJXLThreads_FOUND) if (LibJXL_FOUND AND LibJXLThreads_FOUND)
if(LibJXL_VERSION VERSION_GREATER_EQUAL "0.11.0")
kimageformats_read_tests( kimageformats_read_tests(
jxl jxl
) )
kimageformats_write_tests( kimageformats_write_tests(
jxl-nodatacheck-lossless jxl-nodatacheck-lossless
) )
else()
kimageformats_read_tests(
jxl-skipoptional
)
kimageformats_write_tests(
jxl-skipoptional-nodatacheck-lossless
)
endif()
endif() endif()
if (LibJXR_FOUND) if (LibJXR_FOUND)
@ -125,9 +173,7 @@ if (LibJXR_FOUND)
) )
endif() endif()
# Allow some fuzziness when reading this formats, to allow for kimageformats_read_tests(
# rounding errors (eg: in alpha blending).
kimageformats_read_tests(FUZZ 1
xcf xcf
) )
@ -138,7 +184,7 @@ kimageformats_read_tests(FUZZ 1
# You can append -lossless to the format to indicate that # You can append -lossless to the format to indicate that
# reading back the image data will result in an identical image. # reading back the image data will result in an identical image.
kimageformats_write_tests( kimageformats_write_tests(
pcx-lossless pcx-nodatacheck
pic-lossless pic-lossless
qoi-lossless qoi-lossless
rgb-lossless rgb-lossless
@ -157,7 +203,7 @@ if (OpenEXR_FOUND)
) )
# Color space conversions from sRGB to linear on saving and # Color space conversions from sRGB to linear on saving and
# from linear to sRGB on loading result in some rounding errors. # from linear to sRGB on loading result in some rounding errors.
kimageformats_write_tests(FUZZ 5 kimageformats_write_tests(FUZZ 6
exr-nodatacheck-lossless exr-nodatacheck-lossless
) )
endif() endif()

View File

@ -4,34 +4,66 @@
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 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> template<class Trait>
static bool fuzzyeq(const QImage &im1, const QImage &im2, uchar fuzziness) static bool fuzzyeq(const QImage &im1, const QImage &im2, int fuzziness, bool perceptiveFuzzer)
{ {
Q_ASSERT(im1.format() == im2.format()); Q_ASSERT(im1.format() == im2.format());
Q_ASSERT(im1.depth() == 24 || im1.depth() == 32 || im1.depth() == 64); Q_ASSERT(im1.depth() == 24 || im1.depth() == 32 || im1.depth() == 64);
const bool hasAlpha = im1.hasAlphaChannel();
const int height = im1.height(); const int height = im1.height();
const int width = im1.width(); const int width = im1.width();
for (int i = 0; i < height; ++i) { for (int i = 0; i < height; ++i) {
const Trait *line1 = reinterpret_cast<const Trait *>(im1.scanLine(i)); const Trait *line1 = reinterpret_cast<const Trait *>(im1.scanLine(i));
const Trait *line2 = reinterpret_cast<const Trait *>(im2.scanLine(i)); const Trait *line2 = reinterpret_cast<const Trait *>(im2.scanLine(i));
for (int j = 0; j < width; ++j) { for (int j = 0; j < width; ++j) {
if (line1[j] > line2[j]) { auto &&px1 = line1[j];
if (line1[j] - line2[j] > fuzziness) { 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; 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);
} }
} else {
if (line2[j] - line1[j] > fuzziness) { // Compare the deltas of R, G, B components.
if (dr > fuzz)
return false;
if (dg > fuzz)
return false;
if (db > fuzz)
return false; return false;
}
}
} }
} }
return true; return true;
} }
// allow each byte to be different by up to 1, to allow for rounding errors // 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) static bool fuzzyeq(const QImage &im1, const QImage &im2, uchar fuzziness, bool perceptiveFuzzer = false)
{ {
return (im1.depth() == 64) ? fuzzyeq<quint16>(im1, im2, fuzziness) : fuzzyeq<quint8>(im1, im2, fuzziness); return (im1.depth() == 64) ? fuzzyeq<QRgba64>(im1, im2, int(fuzziness) * 257, perceptiveFuzzer) : fuzzyeq<QRgb>(im1, im2, int(fuzziness), perceptiveFuzzer);
} }

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -0,0 +1,59 @@
[
{
"fileName" : "metadata.png",
"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
}
}
]

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

View File

@ -0,0 +1,2 @@
SPDX-FileCopyrightText: Copyright (c) 2006 - 2010 The Open Toolkit library.
SPDX-License-Identifier: MIT

Binary file not shown.

After

Width:  |  Height:  |  Size: 956 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
autotests/read/dds/r16.dds Normal file

Binary file not shown.

BIN
autotests/read/dds/r16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
autotests/read/dds/r32.dds Normal file

Binary file not shown.

BIN
autotests/read/dds/r32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
autotests/read/dds/rg16.dds Normal file

Binary file not shown.

BIN
autotests/read/dds/rg16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
autotests/read/dds/rg32.dds Normal file

Binary file not shown.

BIN
autotests/read/dds/rg32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
autotests/read/dds/rgba.dds Normal file

Binary file not shown.

BIN
autotests/read/dds/rgba.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

View File

@ -0,0 +1,7 @@
[
{
"fileName" : "rgba16dx10.png",
"fuzziness" : 1,
"description" : "Minimum fuzziness value to pass the test on all architectures."
}
]

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

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: 3.1 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

View File

@ -0,0 +1,7 @@
[
{
"fileName" : "rgba_f16.png",
"fuzziness" : 1,
"description" : "Minimum fuzziness value to pass the test on all architectures."
}
]

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

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: 4.3 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -0,0 +1,9 @@
[
{
"fileName" : "rgb-gimp.png",
"resolution" : {
"dotsPerMeterX" : 3937,
"dotsPerMeterY" : 3937
}
}
]

View File

@ -1,5 +1,11 @@
[ [
{ {
"fileName" : "orientation_all.png" "fileName" : "orientation_all.png",
"metadata" : [
{
"key" : "Software" ,
"value" : "GEGL"
}
]
} }
] ]

View File

@ -1,5 +1,11 @@
[ [
{ {
"fileName" : "orientation_all.png" "fileName" : "orientation_all.png",
"metadata" : [
{
"key" : "Software" ,
"value" : "GEGL"
}
]
} }
] ]

View File

@ -1,5 +1,11 @@
[ [
{ {
"fileName" : "orientation_all.png" "fileName" : "orientation_all.png",
"metadata" : [
{
"key" : "Software" ,
"value" : "GEGL"
}
]
} }
] ]

View File

@ -1,5 +1,11 @@
[ [
{ {
"fileName" : "orientation_all.png" "fileName" : "orientation_all.png",
"metadata" : [
{
"key" : "Software" ,
"value" : "GEGL"
}
]
} }
] ]

View File

@ -1,5 +1,11 @@
[ [
{ {
"fileName" : "orientation_all.png" "fileName" : "orientation_all.png",
"metadata" : [
{
"key" : "Software" ,
"value" : "GEGL"
}
]
} }
] ]

View File

@ -1,5 +1,11 @@
[ [
{ {
"fileName" : "orientation_all.png" "fileName" : "orientation_all.png",
"metadata" : [
{
"key" : "Software" ,
"value" : "GEGL"
}
]
} }
] ]

View File

@ -1,5 +1,11 @@
[ [
{ {
"fileName" : "orientation_all.png" "fileName" : "orientation_all.png",
"metadata" : [
{
"key" : "Software" ,
"value" : "GEGL"
}
]
} }
] ]

View File

@ -1,5 +1,11 @@
[ [
{ {
"fileName" : "orientation_all.png" "fileName" : "orientation_all.png",
"metadata" : [
{
"key" : "Software" ,
"value" : "GEGL"
}
]
} }
] ]

Binary file not shown.

View File

@ -0,0 +1,59 @@
[
{
"fileName" : "metadata.png",
"metadata" : [
{
"key" : "ModificationDate",
"value" : "2025-02-26T16:52:06Z"
},
{
"key" : "Software" ,
"value" : "LIFE Pro 2.18.10 (Linux)"
},
{
"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
}
}
]

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

View File

@ -0,0 +1,11 @@
[
{
"minQtVersion" : "6.8.0",
"fileName" : "testcard_cmyk.tif"
},
{
"maxQtVersion" : "6.7.99",
"unsupportedFormat" : true,
"comment" : "Qt versions lower than 6.8 do not support CMYK format so this test should be skipped."
}
]

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,11 @@
[
{
"minQtVersion" : "6.8.0",
"fileName" : "testcard_cmyk16.tif"
},
{
"maxQtVersion" : "6.7.99",
"unsupportedFormat" : true,
"comment" : "Qt versions lower than 6.8 do not support CMYK format so this test should be skipped."
}
]

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

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: 23 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

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