Commit Graph
63 Commits
Author SHA1 Message Date
Daniel Novomeský 74a734efed jxl: fix build with Qt before 6.8.0 2025-02-15 16:16:10 +01: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
Daniel Novomeský 397957a976 jxl: refactor image saving, native CMYK support 2025-02-07 10:38:46 +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
Daniel Novomeský 8a05711e99 jxl: refactor image loading 2025-01-29 17:02:51 +00:00
Daniel Novomeský bda8487147 heif: fix -Wstringop-overread warning 2025-01-08 16:45:57 +01:00
Daniel Novomeský bb10c4bd5c jxl: refactor metadata boxes reading 2025-01-08 12:43:42 +01:00
Daniel Novomeský 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
Daniel Novomeský a7cf1a87f9 Update heif.json 2024-12-31 17:33:58 +01:00
Daniel Novomeský 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
Daniel Novomeský 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
Daniel Novomeský 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
Daniel NovomeskýandAlbert Astals Cid 638fdfcbdd pcx: fix crash on invalid files
Added new PCX testfile for readtest.
2024-07-22 22:13:14 +00:00
Daniel Novomeský e9da5edb9a avif: check return values
Some libavif calls did not return values in the older versions.
Situation changed meanwhile;
we can check the return values for error conditions now.
2024-07-15 17:46:21 +02:00
Daniel Novomeský da8ed31aec avif: new quality settings
Prior libavif 1.0, quality was set using two numbers
(minQuantizer and maxQuantizer).
New versions of libavif recommend using
new/single quality parameter instead.
Compression using the new settings is different
compared to the old.
For example, new quality 68 gives similar compression
like old default 52.
2023-12-13 17:40:21 +01:00
Daniel Novomeský ce8383e5fd HEIF plug-in extended to support HEJ2 format
HEJ2 is JPEG 2000 codec encapsulated in HEIF container.
Only HEJ2 reading is implemented.
2023-12-07 13:26:43 +01:00
Daniel Novomeský b8b980f400 avif: support repetition count
and minor performance optimizations.
2023-10-06 13:03:28 +02:00
Daniel Novomeský ac808679cd qoi: initialize structure before use
It was reported by Code Quality scans as Critical (CWE-457)
2023-08-29 21:04:00 +02:00
Daniel Novomeský 2aea982e9e qoi: fix reports from quality scanner
struct QoiHeader is initialized to invalid values prior use,
it’s good to detect situations when we read incomplete data.
Add include in scanlineconverter.cpp so it can be used without
change in kf5 branch.
2023-08-29 16:22:52 +02:00
Daniel Novomeský 9c579fc1f8 jxl: add support for libjxl v0.9, drop support for old 0.6.1 2023-06-27 14:32:08 +02:00
Daniel Novomeský b654f20ece heif: reject invalid files with zero size 2023-01-29 16:16:52 +01:00
Daniel Novomeský f4ca3f6783 heif: fix error handling 2022-12-13 11:11:38 +01:00
Daniel Novomeský a30f043e5d heif: rewrite plugin to use only libheif C API
Using C-API instead of C++ libheif API has following advantages:
- More libheif features available (for ex.: strict decoding)
- Linking with static build of libheif is possible
- No need to enable exceptions
2022-12-05 22:43:41 +01:00
Daniel NovomeskýandAlbert Astals Cid 3b1e8f7054 minor tweaks in HEIF and AVIF plugins
It is mostly only about casting between types.
2022-11-19 11:38:49 +00:00
Daniel Novomeský d734f28727 jxl: indicate when all frames have been read
and return correct loop count
2022-10-18 17:58:40 +02:00
Daniel Novomeský afa7399b36 avif: minor fixes
libavif 0.11.0 uses new default dimension limit 32768 pixels,
we allow 65535 which was used by us previously.
Minor tweaks in jumpToNextImage, jumpToImage
to handle rare situations.
2022-10-18 15:05:15 +02:00
Daniel Novomeský bfb12093ad avif: indicate when all frames have been read 2022-10-15 20:08:39 +02:00
Daniel Novomeský bcbf45e23a Add JXL test files corresponding to 8 EXIF orientation values 2022-10-13 15:47:04 +02:00
Daniel Novomeský c71a7984d6 Add AVIF test files with rotation and mirror operations 2022-10-12 15:39:27 +02:00
Daniel Novomeský b1f3a87896 Auto-rotate input images in readtest
Currently, there is no difference in the tests but in the future
we will add images with various transformations defined.
2022-10-12 15:33:08 +02:00
Daniel Novomeský 8af9a0f9d9 jxl: remove C-style casts 2022-10-11 15:38:55 +02:00
Daniel Novomeský 3790a89cd1 avif: Use reinterpret_cast instead C cast
No longer using int for QByteArray size because Qt6 uses qsizetype
2022-10-11 15:05:20 +02:00
Daniel Novomeský f475a4b24a avif: revert 9ac923ad09 commit
Changes to libavif's avifImageRGBToYUV() API were reverted too.
2022-10-11 14:36:17 +02:00
Daniel Novomeský d2f38b8b9c heif: replace C cast with static_cast 2022-10-10 09:28:41 +00:00
Daniel Novomeský 9ab64dbf22 heif: use heif_init/heif_deinit with libheif 1.13.0+
In recent libheif, application should use
heif_init/heif_deinit calls. Unfortunately, these calls are
not thread-safe in released 1.13.0 version yet (will be in the
future) and HEIFHandler is often created in different threads.
So we have to guard their use with a mutex.
2022-10-10 09:28:41 +00:00
Daniel Novomeský 024d199ed0 Replace C cast with reinterpret_cast 2022-09-11 11:01:55 +02:00
Daniel Novomeský 9ac923ad09 avif: adjust for libavif breaking change in YUV<->RGB conversion 2022-09-09 17:54:18 +02:00
Daniel Novomeský 5e59d950bd jxl: support both old 0.6.1 and new 0.7.0 libjxl API
New libjxl API changed the way how lossless 16bit depth images
must be encoded: codestream level 10 must be set,
which implies use of container format.
Unfortunately, there isn’t version number inside libjxl header yet,
so we must detect new version on cmake/PkgConfig level.
2022-06-22 22:21:33 +00:00
Daniel Novomeský cf375a207f avif: read performance improvements 2022-06-20 18:50:03 +02:00
Daniel Novomeský ebcc34519c avif: prepare for breaking change in libavif 2022-05-02 11:46:37 +02:00
Daniel Novomeský 84d56d00cf avif: lossless support 2022-04-06 16:13:10 +00:00
Daniel Novomeský e69dff73e6 avif: encoder speed 7->6 2022-03-10 09:44:50 +01:00
Daniel Novomeský 64cfe52bee avif: fix jumpToImage 2022-03-10 09:39:53 +01:00
Daniel Novomeský 8732fc8487 avif: warn about non-recommended libavif configuration 2022-03-10 09:35:08 +01:00
Daniel Novomeský f04084e175 jxl: encoding improvements
Plug-in can save in 8bit depth now,
previously only 16bit was supported.
Memory and dimension limits were adjusted.
2022-02-16 10:26:56 +01:00
Daniel Novomeský 9911c9c2ea avif: adjust dimension and memory limits
With or height can be above 32k now (up to 64k), but
image should not have more than 256megapixels
(Default memory limit of libavif)
2022-02-11 16:01:07 +01:00
Daniel Novomesky f445e5dd0a avif: limit scope of variables 2021-11-29 17:35:51 +01:00
Daniel Novomesky d3da56bba3 Add JXL to the list of supported formats 2021-11-17 20:06:11 +01:00
Daniel Novomesky 41c4b5930c Add plugin for JPEG XL (JXL) 2021-11-10 16:01:58 +01:00
Daniel Novomesky 6458c9ae52 avif: performance and quality improvements
Enable decoder to use more threads.
8bit YUV->RGB conversion is significantly faster
when AVIF_RGB_FORMAT_RGBA format is used,
because libavif can use libyuv to perform conversion quickly.
Prefer faster AVIF_CHROMA_UPSAMPLING_FASTEST when decoding animation.
Encoder speed changed from to 8 to 7.
Recent AV1 encoders got faster,
so it is OK to switch to better compression quality.
Remove obsolete image/avif-sequence mime-type
as it was merged with image/avif.
2021-09-22 11:53:46 +02:00
Daniel Novomesky ef6be2c077 avif: Disable all strict decoder checks
New libavif 0.9.1 apply some very strict standard compliance
checks by default. Unfortunately, it rejects many files made by
libheif-based apps (GIMP, ImageMagick) in the past.
libheif 1.12.0 (released on May 5, 2021) addressed the problem,
but it would be good to extend grace period, allowing other
projects and distributions to upgrade to fixed version.
2021-06-08 15:20:41 +02:00
Daniel Novomesky bf3f94da76 avif: Adjust for libavif breaking change 2021-06-04 14:37:10 +02:00
Daniel Novomesky dca6e87c89 Enable HEIC plugin to save all ICC profiles 2021-05-14 12:30:28 +02:00
Daniel Novomesky 62f9af9a35 Color profile loading/saving fixes
Allow saving Qt-unsupported variants of ICC profiles, they could be
correctly handled by apps with wider color management support.
Change way how QColorSpace is created to avoid
rare problems in some apps.
2021-05-13 16:56:46 +02:00
Daniel Novomesky 511a22f0b4 Check the input buffer before passing it to libheif 2021-03-02 11:46:13 +00:00
Daniel Novomesky 1462c3abd6 Check primaries returned from libavif
Due to various double vs float arithmetic,
some primaries could be rejected by Qt.
If necessary, we adjust the values so they
will be accepted by Qt.

Remove newline from the ends of error strings.
2021-02-27 19:11:56 +01:00
Daniel Novomesky ca52d4ddf5 Add plugin for High Efficiency Image File Format (HEIF)
Code partially by Sirius Bakke
2021-02-25 11:52:00 +01:00
Daniel Novomesky 8b9125c913 Quality option can be returned without parsing input file. 2021-02-08 10:00:53 +01:00
Daniel Novomesky 8845dd9818 Simplify portion of NCLX color profile code 2021-02-02 09:28:32 +01:00
Daniel NovomeskýandAlbert Astals Cid 34a9ec1b06 Add plugin for AV1 Image File Format (AVIF) 2020-12-13 22:23:27 +00:00