Commit Graph

709 Commits

Author SHA1 Message Date
Laurent Montel
6f588c6fd3 Add missing include mocs 2025-04-03 07:34:17 +02:00
Laurent Montel
a182478e2c It compiles fine without qt6.9 deprecated methods 2025-03-23 22:52:05 +00:00
Mirco Miranda
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
Laurent Montel
bef2b9168f It compiles fine without kf6.12 deprecated methods 2025-03-22 06:47:20 +01:00
Daniel Novomeský
473f5d9847 Write tests for hej2 format 2025-03-16 21:31:46 +01:00
Daniel Novomeský
9bee29cc01 heif: enable saving of hej2 format 2025-03-16 18:37:48 +01:00
Nicolas Fella
cdf3be3af1 Update dependency version to 6.13.0 2025-03-14 21:31:42 +01:00
Albert Astals Cid
752b18a42c CI: Enable heif so we make sure it compiles 2025-03-12 16:17:29 +00:00
Daniel Novomeský
97a1ea181c writetest: special handling for HEIF format 2025-03-12 16:41:39 +01:00
Daniel Novomeský
64a43fb04f readtest: special handling for HEIF format 2025-03-12 16:17:59 +01:00
Daniel Novomeský
6821c29819 heif: disable AVCI decoder for libheif before 1.19.6 2025-03-12 13:26:42 +01:00
Daniel Novomeský
e4d95c03fa SKIP tests when libheif configuration is incomplete 2025-03-10 22:01:14 +01:00
Daniel Novomeský
afa8ed1a5d heif: enable reading images with native 16 bit depth 2025-03-10 19:42:34 +01:00
Mirco Miranda
245c835d92 Use of heif_context_add_XMP_metadata instead
heif_context_add_XMP_metadata2
2025-03-09 10:44:18 +01:00
Nicolas Fella
b2663d2651 Update dependency version to 6.13.0 2025-03-07 19:00:23 +01:00
Nicolas Fella
35ab37c628 Update dependency version to 6.12.0 2025-03-07 15:09:18 +01:00
Albert Astals Cid
b28baa4a1e sct: qRound with param bigger than max int is undefined
oss-fuzz/399667098
2025-03-04 06:33:52 +00:00
Albert Astals Cid
5d2540c135 sct: Use height instead of width when calculating dotsPerMeterY 2025-03-04 06:29:58 +00:00
Mirco Miranda
25cc8bc262 MicroExif: search for the TIFF signature 2025-03-03 09:17:56 +01:00
Mirco Miranda
7742537f8c MicroExif: API improvements and minor bugfixes 2025-03-02 13:34:02 +00:00
Mirco Miranda
d3386bbf50 Fix compilation error 2025-03-02 13:49:25 +01:00
Mirco Miranda
e77986c7e0 Added support for resolution and EXIF/XMP metadata to HEIF 2025-03-02 08:03:28 +00:00
Mirco Miranda
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
Mirco Miranda
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
Mirco Miranda
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
Mirco Miranda
bb1c6aab9e Added pixel limit detected by experimental tests 2025-02-17 08:54:49 +01:00
Daniel Novomeský
74a734efed jxl: fix build with Qt before 6.8.0 2025-02-15 16:16:10 +01:00
Mirco Miranda
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
Daniel Novomeský
36a6ef7d78 heif: improve handling of grayscale ICC profiles 2025-02-10 16:59:49 +00:00
Daniel Novomeský
9fd6896cec Improve printing details when writetest fails 2025-02-10 16:59:49 +00:00
Daniel Novomeský
9b14e752db Update HEIF writetest templates 2025-02-10 16:59:49 +00:00
Laurent Montel
90a2e3b412 GIT_SILENT: it compiles fine without kf6.11 deprecated methods 2025-02-10 06:46:22 +01:00
Mirco Miranda
b28cf4c352 Added JXL to CMYK formats 2025-02-07 15:55:23 +01:00
Nicolas Fella
b536ec4a5e Update version to 6.12.0 2025-02-07 15:38:22 +01:00
Nicolas Fella
7d7b295ac2 Update dependency version to 6.11.0 2025-02-07 14:47:25 +01:00
Daniel Novomeský
397957a976 jxl: refactor image saving, native CMYK support 2025-02-07 10:38:46 +00:00
Mirco Miranda
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
Daniel Novomeský
7a74b50d64 imageconverter: possibility to set image quality 2025-02-04 14:42:44 +01:00
Daniel Novomeský
0a06a07fa4 Print more details when writetest fails 2025-02-04 10:09:12 +00:00
Mirco Miranda
e89408b426 Fix RAW mime type 2025-01-31 08:32:23 +01:00
Daniel Novomeský
8a05711e99 jxl: refactor image loading 2025-01-29 17:02:51 +00:00
Laurent Montel
d6534f0e68 Add xml/yaml linting 2025-01-29 06:57:55 +01:00
Albert Astals Cid
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
Mirco Miranda
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
Mirco Miranda
424e7a75de Modified PCX mime type according to IANA db 2025-01-23 08:00:37 +01:00
Mirco Miranda
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
Laurent Montel
baaf1093a1 GIT_SILENT: it compiles fine without kf6.10 deprecated methods 2025-01-20 09:53:06 +00:00
Mirco Miranda
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
Mirco Miranda
873ec1bb5f More metadata read tests
Adds some metadata/read resolution tests without adding new images.
2025-01-16 23:03:37 +00:00
Mirco Miranda
287a447095 Fix use of deprecated methods 2025-01-16 14:02:44 +01:00