Commit Graph

28 Commits

Author SHA1 Message Date
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
Daniel Novomeský
906ecce500 qoi: write support backported from master 2023-08-30 06:36:28 +00: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
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
f8bfdce285 CMakeLists: enable EXR test 2022-10-02 06:01:23 +00:00
Mirco Miranda
65a20b43fc Camera RAW images plugin
Plugin to read RAW camera images based on LibRAW.

- Supersedes MR !86 
- Support to LibRaw 0.20 and 0.21-Beta
- Support to multi-shot images: use imageCount(), jumpToImage() to select the wanted shot
- By default generates 16-bits sRGB images using camera white balance and interpolation AHD
- Should fix CCBUG: 454208: on my Debian with KF5.96 and the pulgin installed, I see the preview of all my RAW files (ARW included) in Dolphin

News compared to V1 (MR !86)

- Fix possible stack overflow due to the huge size of LibRaw class
- Fix image allocation with Qt 6 (make use of QImageIOHandler::allocateImage()) 
- Support to XMP metapacket
- Support to quality option. For e.g. you can focus on quality (q = 10) or speed (q = 1)
- oss-fuzz available [here](https://github.com/mircomir/oss-fuzz/tree/raw_fuzz/projects/kimageformats)
2022-09-19 23:52:43 +00:00
Daniel Novomeský
84d56d00cf avif: lossless support 2022-04-06 16:13:10 +00:00
Albert Astals Cid
4afafee6c1 Add write tests for heif/avif/jxl
Unfortunately none of them pass since it seems they can't load a png,
save it to their format with loseless quality and read it back and get
exactly the same contents than the png
2022-02-18 00:05:01 +01:00
Laurent Montel
32347725cb Fix typo 2021-12-21 20:28:05 +01:00
Laurent Montel
56e762c563 Make it compile against qt6 2021-12-21 20:10:11 +01:00
Daniel Novomesky
41c4b5930c Add plugin for JPEG XL (JXL) 2021-11-10 16:01:58 +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
Kai Uwe Broulik
b79d1f222d Add plugin for animated Windows cursors (ANI) 2021-01-03 08:49:10 +00:00
Daniel Novomeský
34a9ec1b06 Add plugin for AV1 Image File Format (AVIF) 2020-12-13 22:23:27 +00:00
Christoph Feck
68bb1a0ee7 Port HDR (Radiance RGBE) image loader to Qt5
Tested with HDR images from hdrihaven.com
* Loading in KolourPaint works
* Thumbnails in Dolphin work

Reviewed by: aacid

Differential Revision: https://phabricator.kde.org/D23811
2019-09-14 14:05:30 +02:00
Albert Astals Cid
03c3c07004 Fix tests on jenkins
Qt also has a tga image plugin so unless we make sure ours is used first
tests are not testing what they should

On a side note their plugin fails our tests so someone with enough time
should report the failures to them
2019-01-28 21:27:22 +01:00
Boudewijn Rempt
6934d54417 Add kra and ora imageio plugins (read-only)
kra is the native format for Krita and ora the interchange format
for krita, gimp and mypaint (it's also mypaint's native format).
Both formats are simply zip containers with an embedded png.

REVIEW:126675
2016-01-31 15:01:32 +01:00
Heiko Becker
e5fce91de6 Remove DDS and JPEG-2000 plugins
They were already disabled when building with Qt >= 5.3 in commit
3d45b270ea because Qt has better plugins
for those image formats. Now that we depend on Qt 5.3 we can remove
them.

REVIEW: 124636
2015-08-06 00:57:14 +02:00
Alex Merry
51eca9b6a8 Rewrite the PIC image format handler
It now uses QDataStream to deal with endianness. It also supports
several QImageIOHandler options.

This comes with a more comprehensive test suite than the old code. Note
that the old test suite was incorrect as the old code wrote the floats
in the header out incorrectly (although no-one noticed because no
software seems to care about those values).

All the test PIC files in the test suite appear correct according to the
specification (by inspection with Okteta). Unfortunately, there is a
lack of other freely-available software that reads and writes PIC files
(the main application that uses them is proprietary), and so this is the
best I can do.

REVIEW: 117944
2014-05-04 13:42:30 +01:00
Alex Merry
1eb5228cce Allow some fuzz in the jp2 unit test
See the comment added to the CMake file.

CCMAIL: jr@jriddell.org
2014-04-25 17:57:40 +01:00
Alex Merry
0f795e6625 Implement fuzzy image matching in readtest
Images are converted to ARGB32 format, then each byte (ie: each pixel
channel) in the read image is allowed to deviate by some specified
amount from the corresponding byte in the expected image, to allow for
rounding errors etc.

By default, no deviation is permitted, but the XCF tests are allowed a
deviation of 1, as the alpha blending can result in rounding errors
(depending on whether hardware acceleration is used, for example).  In
the end, we are not too concerned about a small deviation that is
invisible to the human eye.

REVIEW: 116567
2014-03-05 12:10:45 +00:00
Alex Merry
6375160828 Remove the WebP format
This will be in Qt 5.3.

REVIEW: 116026
2014-02-25 12:16:34 +00:00
Alex Merry
6272954cc5 Only perform tests for plugins that are built
This both excludes the autotests and tests subdirs if the user sets
BUILD_TESTING off, and makes sure we do not run tests for formats that
were not built due to dependencies not being found.

REVIEW: 115504
2014-02-23 11:54:40 +00:00
Alex Merry
7177296335 Import the WebP image I/O code from kde-runtime
The plugin export mechanism has been patched up (including the addition
of the JSON file), and the FindWebP.cmake file is new.

Writing is currently disabled, as it produces broken images.

Autotests are generated using the cwebp and dwebp utilities distributed
with the libwebp reference library.

REVIEW: 115355
2014-02-20 12:56:00 +00:00
Alex Merry
3eafdc861a Remove the xv image format plugin
It appears to be some internal format of xview, although I cannot find
any mention of such a thing on the internet.  There does not appear to
be any sort of mime type to associate with this file format, either.

Therefore, I think it is reasonable to declare it obsolete.

REVIEW: 115768
2014-02-15 18:47:06 +00:00
Alex Merry
14b4932392 Disable EPS dumb read tests
Possibly unsurprisingly, the dark art of using GhostScript to render a
subset of PostScript is not entirely stable across versions of that
tool.  Additionally, we cannot even guarantee that GhostScript will be
available machines that run the tests.
2014-02-03 18:35:15 +00:00
Alex Merry
bfea0e0e7c Do not do the stupid write test for EPS
EPS writing can be done either by pdftops from Poppler, or by
GhostScript.  These two tools produce very different output, so the
simple write test will always fail on some systems (currently ones
without poppler).
2014-02-03 15:38:46 +00:00
Alex Merry
f0f6d14367 Add simple autotests
Two main tests: read the file and compare to a given image (loaded from
png), and write a file out and compare to a previously-written image.

The write test in particular is kind of fragile, but it should help
catch some errors where a code change was not intended to affect the
output of the plugin.

Tests are included for all the writable formats, as well as every
readable format that GIMP can write to (and so I could easily get an
example of).

REVIEW: 115430
2014-02-03 15:03:29 +00:00