Commit Graph

536 Commits

Author SHA1 Message Date
Daniel Novomeský
df82311a10 jxl: Disable color conversion for animations
Partial backport from master
2024-12-02 18:41:10 +01:00
Daniel Novomeský
1e47a751df heif: backport fixes from master
Avoid crash in heif_image_handle_has_alpha_channel
Try to load Xiaomi images with non-strict decoding second time.
2024-11-23 16:03:57 +01:00
Albert Astals Cid
09b9ff7bf9 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

(cherry picked from commit 3489806ae2568b4aba1167b29828dfb745231fb5)
2024-10-16 23:56:17 +02:00
Volker Krause
ee77e349e3 Retire KF5 Android CI
See extra-cmake-modules!461.https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/461.

GIT_SILENT
2024-09-19 18:26:52 +02:00
Mirco Miranda
4168c46964 RAW: Fixed unnecessary image unpack
Backport of MR !254 (According to the libraw documentation, the sizes are available directly after open_datastream.)

One benefit is that it doubles the speed of preview creation in Dolphin.
2024-09-15 10:31:40 +00:00
Mirco Miranda
f9f29304d8 XCF: fix crash (KF5) 2024-08-27 21:52:25 +00:00
Mirco Miranda
ec0918d962 PCX and XCF: Fixes backport
Backport quality and security bug fixes from master:
- MR !220
- MR !226
- MR !231 (XCF part only)
- MR !241
- MR !242
- MR !244
2024-08-15 16:04:35 +00:00
Daniel Novomeský
dadff2791c 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 18:24:49 +02:00
l10n daemon script
106279d32e GIT_SILENT Upgrade ECM and KF version requirements for 5.116.0 release. 2024-05-04 11:40:17 +00:00
Mirco Miranda
f5962442ca TGA: added options support
Code aligned with KF6 (MR !210) to mitigate CCBUG: 413801 and CCBUG: 479612

- Added Size and Format options support
- Fixed a double image allocation when reading RGBA images (RGB was always allocated and then replaced by RGBA one)
- Fixed the code for sequential devices
2024-03-14 21:46:04 +00:00
Mirco Miranda
7cc4cb8d0c More header checks (CCBUG: 479612)
(cherry picked from commit 0710bc65f6)
2024-02-29 23:59:57 +01:00
l10n daemon script
2bf3a859fc GIT_SILENT Upgrade ECM and KF version requirements for 5.115.0 release. 2024-02-03 14:24:22 +00:00
l10n daemon script
3ce3ab2364 GIT_SILENT Upgrade ECM and KF version requirements for 5.114.0 release. 2024-01-06 08:53:06 +00:00
Daniel Novomeský
c09b88b7c6 avif: new quality settings
Backported from master
2023-12-14 15:57:50 +01:00
Daniel Novomeský
8cc25c39b4 Update CI template 2023-12-07 13:48:53 +01:00
Daniel Novomeský
43c80793ac 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 12:58:14 +01:00
l10n daemon script
e90bca4924 GIT_SILENT Upgrade ECM and KF version requirements for 5.113.0 release. 2023-12-02 09:26:53 +00:00
l10n daemon script
bfc73ca260 GIT_SILENT Upgrade ECM and KF version requirements for 5.112.0 release. 2023-11-04 10:03:03 +00:00
l10n daemon script
f6bb59228e GIT_SILENT Upgrade ECM and KF version requirements for 5.111.0 release. 2023-10-07 10:20:46 +00:00
Daniel Novomeský
ee381958b2 avif: support repetition count
and minor performance optimizations.
2023-10-06 12:52:48 +02:00
Mirco Miranda
478e49b8a6 raw: fix multi image load
Fixes not loading a second image in the file. This patch allow code like the following.

QImageReader r(file);
do {
    auto qi = r.read();
    if (!qi.isNull()) {
        qi.save(QString("/tmp/%1_%2.tif")
                .arg(QFileInfo(file).baseName())
                .arg(r.currentImageNumber()));
    }
}
while (r.jumpToNextImage());

m_startPos is used to reposition the device if you decide to do a subsequent read: libraw wants it to be at the beginning of the RAW stream

(cherry picked from commit 18ea0492bc)
2023-09-25 22:56:39 +02:00
Mirco Miranda
c3daf86079 hdr: fix oss-fuzz issue 62197
Fixes the following error:

| /src/kimageformats/src/imageformats/hdr.cpp:56:31: runtime error: shift exponent 32 is too large for 32-bit type 'int' |
|------------------------------------------------------------------------------------------------------------------------|
2023-09-11 09:07:53 +00:00
Mirco Miranda
a981cefdd2 hdr: fix crash (oss-fuzz)
This patch Fixes crash when RLE data is corrupted (test cases attached).

Should also fixes (no test cases available):
- Issue 62044 in oss-fuzz: kimageformats:kimgio_hdr_fuzzer: Undefined-shift in RGBE_To_QRgbLine
- Issue 62057 in oss-fuzz: kimageformats:kimgio_hdr_fuzzer: Heap-buffer-overflow in Read_Old_Line


[crash-646a4364479f54278ff8c30c69b0c9665e5869af.hdr](/uploads/44760f0286cde4236feab8e352493556/crash-646a4364479f54278ff8c30c69b0c9665e5869af.hdr)

[crash-88c33e2b49e57e6d1d4ec6945476f605f00e714a.hdr](/uploads/e35bf53ee717134a796c4b17cfacca42/crash-88c33e2b49e57e6d1d4ec6945476f605f00e714a.hdr)
2023-09-07 16:22:33 +00:00
Mirco Miranda
723f72930b xcf: fix crash (oss-fuzz issue 62075) 2023-09-07 16:13:18 +00:00
Mirco Miranda
99bb24803a xcf: fix oss-fuzz issue
May fix possible crash on QPainter.
2023-09-05 10:17:22 +00:00
l10n daemon script
63a9de758f GIT_SILENT Upgrade ECM and KF version requirements for 5.110.0 release. 2023-09-03 07:35:19 +00:00
Ernest Gupik
240e28aac5 QOI: Advertise write support in the desktop file 2023-08-30 14:56:55 +02:00
Daniel Novomeský
906ecce500 qoi: write support backported from master 2023-08-30 06:36:28 +00:00
Mirco Miranda
b2b677b8a5 xcf: format v12 support (kf5)
The code is the same of MR !166 (master) but test cases are slightly different due to rounding.
2023-08-29 22:03:34 +00:00
Antonio Rojas
bcec942cc9 Support libavif 1.0
Make cmake find libavif 1.0 and adapt to API changes (which is reverting to pre 0.9.2 API)

(cherry picked from commit 4badb3088e)
2023-08-29 11:05:53 +02:00
Friedrich W. H. Kossebau
66cb8c91d0 No longer needed to explicitly include CMakeParseArguments
NO_CHANGELOG

(cherry picked from commit 4bd9d5baec)
2023-08-28 22:55:25 +02:00
Mirco Miranda
899a2df42d exr: multiple fixes (kf5)
The code is the same of MR !170 (master) but test cases are slightly different due to rounding.
* Support for images with transparency
* Precise colorspace conversion using QT color spaces
* Set the correct resolution
* Set useful metadata
* Creates 16-bits images
* Speed improvements
2023-08-28 17:29:34 +00:00
Mirco Miranda
47920ed63c Fix missing qoi.desktop 2023-08-19 08:53:00 +02:00
Mirco Miranda
274f30e008 qoi: fix buffer overflow kf5
Backport of MR !167:
- fix buffer overflow with corrupted images without image data
- fix unable to read very small images (e.g. 1x1 px)
- new test cases added
- detect incomplete files by checking the end of streams as written in the specs
2023-08-18 15:11:41 +00:00
Mirco Miranda
4348a09733 Renamed qoi.h to qoi_p.h
(cherry picked from commit 7a0d95af92)
2023-08-14 00:15:55 +02:00
Mirco Miranda
dd4576a472 Minor improvements
(cherry picked from commit 4c3ade04dd)
2023-08-14 00:15:52 +02:00
Ernest Gupik
9438540735 Add support for the QOI image format
This MR adds read-only QOI (https://qoiformat.org/) image format support for KImageFormats.

This format has received it's MIME type inclusion in shared-mime-info 4 months ago: ff51a0a9e3

The code is based on the reference QOI implementation at https://github.com/phoboslab/qoi/blob/master/qoi.h

Official test images: https://qoiformat.org/qoi_test_images.zip

![pngvsqoi](/uploads/e386aa5057641057106e21940c770d97/pngvsqoi.png)

Also: This is my first MR to KDE ;)
(cherry picked from commit b209e54b6f)
2023-08-11 22:47:48 +02:00
Mirco Miranda
cf78907ff4 Set linear color space and round fix 2023-08-08 19:37:46 +00:00
l10n daemon script
bcb5308545 GIT_SILENT Upgrade ECM and KF version requirements for 5.109.0 release. 2023-08-05 12:37:26 +00:00
Mirco Miranda
c3a91c3bc6 psd: Fix UB type punning
BUGS: 471829
2023-07-16 08:03:58 +00:00
Mirco Miranda
034b8f331b Treat 3-channel MCH images as CMY images
(cherry picked from commit 6559bf8994)
2023-07-03 23:26:50 +02:00
Friedrich W. H. Kossebau
ed6a3c520d Add explicit moc includes to sources for moc-covered headers
* speeds up incremental builds as changes to a header will not always
  need the full mocs_compilation.cpp for all the target's headers rebuild,
  while having a moc file sourced into a source file only adds minor
  extra costs, due to small own code and the used headers usually
  already covered by the source file, being for the same class/struct
* seems to not slow down clean builds, due to empty mocs_compilation.cpp
  resulting in those quickly processed, while the minor extra cost of the
  sourced moc files does not outweigh that in summary.
  Measured times actually improved by some percent points.
  (ideally CMake would just skip empty mocs_compilation.cpp & its object
  file one day)
* enables compiler to see all methods of a class in same compilation unit
  to do some sanity checks
* potentially more inlining in general, due to more in the compilation unit
* allows to keep using more forward declarations in the header, as with the
  moc code being sourced into the cpp file there definitions can be ensured
  and often are already for the needs of the normal class methods

(cherry picked from commit 34ed3bad27)
2023-07-02 11:55:33 +02:00
l10n daemon script
bf1c7e8508 GIT_SILENT Upgrade ECM and KF version requirements for 5.108.0 release. 2023-07-01 09:58:24 +00:00
Daniel Novomeský
3cb6519dcc jxl: add support for libjxl v0.9, drop support for old 0.6.1 2023-06-27 23:05:15 +00:00
Nicolas Fella
6cbf7529ee Remove qt6 CI builds
The Qt6 builds for kf5 are no longer needed
2023-06-27 18:33:03 +02:00
l10n daemon script
55227815d5 GIT_SILENT Upgrade ECM and KF version requirements for 5.107.0 release. 2023-06-03 09:46:49 +00:00
Mirco Miranda
64d51ed610 pcx: multiple fixes (2)
- 1-bit writer: checks where is black and use NOT operator only if needed
- Fix images with witdh == 65536(*)
- Checks result of disk writes and reads on all formats

(*) PCX formats support images with with of 65536 but only if the header field bytesPerLine is valid (no overflow). This means that the width 65536 is supported on 1bpp images only.
The previous version of the plugins wrote an image with width of 65536px in the wrong way and it was unable to read it (wrong image returned). I verified that Photoshop and Gimp weren't able to read the image either.

(cherry picked from commit d57ff91f8b)
2023-05-25 23:58:42 +02:00
Mirco Miranda
2ca57c9c59 Avoid unnecessary conversions
(cherry picked from commit edd6adcbac)
2023-05-25 23:58:42 +02:00
Mirco Miranda
f7fd14d418 RGB/SGI writer: fix alpha detection and image limit size
(cherry picked from commit d787c12727)
2023-05-25 23:58:42 +02:00
Mirco Miranda
c9aa1ff629 TGA writer: fix alpha detection and performance improvements
(cherry picked from commit c9fec5e408)
2023-05-25 23:58:42 +02:00