Commit Graph

44 Commits

Author SHA1 Message Date
Mirco Miranda
62eb1d28cb Add README about autotests 2025-05-03 11:01:46 +02:00
Mirco Miranda
7742537f8c MicroExif: API improvements and minor bugfixes 2025-03-02 13:34:02 +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
bb1c6aab9e Added pixel limit detected by experimental tests 2025-02-17 08:54:49 +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
Mirco Miranda
b28cf4c352 Added JXL to CMYK formats 2025-02-07 15:55:23 +01:00
Mirco Miranda
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
Mirco Miranda
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
Mirco Miranda
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
Mirco Miranda
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
Mirco Miranda
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
Mirco Miranda
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
Mirco Miranda
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
Mirco Miranda
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
Mirco Miranda
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
Mirco Miranda
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
Mirco Miranda
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
Mirco Miranda
145dedf360 README update
Added some information about plugins and their behaviors (when they do particular things).
2024-08-26 15:18:57 +00:00
Mirco Miranda
63e21ee5f3 Disable JXR plugin due to crashes in JXRLIB
I ran a simple fuzzer on all the plugins in the repo and the JXR one crashes every few seconds. I attach some files (I have many more) that cause the crashes. For the moment I think it's best to keep it deactivated.

The strange thing is that for the same plugin I had created the PR on oss-fuzz which ran locally for over an hour without problems. I'm a bit confused.
2024-06-13 22:24:19 +00:00
Mirco Miranda
06f097046c PFM: Portable FloatMap read only support
Simple HDR format supported by GIMP (read/write) and Photoshop (read/write).
2024-06-13 22:20:40 +00:00
Mirco Miranda
950ed43623 PXR: Pixar raster read only support
Limited read only support to Pixar raster as supported by Photoshop (RGB and Gray 8-bit only).
2024-06-12 22:42:08 +00:00
Mirco Miranda
b8a9c75c80 JXR support
CCBUG: 451584

An implementation of the JXR format.
2024-06-07 10:35:25 +00:00
Mirco Miranda
7899c27a80 exr: write support and more
- Added support for writing EXR files
- Large image support (tested with 32GiB 16-bit image)
- OpenEXR multithreaded read/write support through the use of line blocks
- Build option to enable conversion to sRGB when read (disabled by default)
- Multi-view image reading support
- Options support: Size, ImageFormat, Quality, CompressRatio
- Metadata write/read support via EXR attributes

The plugin is now quite complete. It should also work on KF5 (not tested): if there is the will to include this MR also on KF5, let me know and I will do all the necessary tests.
2023-09-17 08:07:47 +00:00
Mirco Miranda
9173f02ea3 ras: rle decode
Added support for RLE compressed images. This patch makes the player almost complete allowing to read all type 1,2 and 3 RAS files. Only types 4 and 5 are missing which are images converted from TIFF and IFF.
2023-08-29 09:11:35 +00:00
Mirco Miranda
8dc685df26 qoi: write support
As a base I used the reference implementation found on the official site at https://qoiformat.org/ (MIT license).
I added a class to convert scan lines in scanlineconverter.cpp. The class takes advantage of the QImage conversion and contrary to what one might expect, with large images it improves performance (compared to converting the whole image) 😄 

In progressive mode, for each line, the following conversions (only if needed) are made before saving:
1. If the icc profile is set, the line is converted to sRGB or sRGB Linear.
2. The line is scaled to 8 bits with RGBA order.
2023-08-28 22:25:10 +00:00
Mirco Miranda
c02bf3dbcc Readme.md: Update supported formats list
- (+) Krita (kra)
- (+) OpenRaster (ora)
- (-) XView (xv)
2023-08-20 08:04:21 +00:00
Mirco Miranda
35ff3efbbc hdr: improve precision
- Improve the precision of HDR format (it is a floating point format) by using the RGBA32FPx4 image format.
2023-08-13 22:19:22 +00:00
Ernest Gupik
b209e54b6f 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 ;)
2023-08-11 20:44:17 +00:00
Éric Gillet
a3f7c03b61 heif: Add format read-write support in README 2023-02-15 08:36:24 +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
Mirco Miranda
98f19c60ae PSD: Performance improvements and support to missing common formats
- Supersedes merge request !55 (PSB support, XMP metadata, ICC color profile, image resolution read)
- Performance improvements: 5 time faster than previous version (tested on a 3.9GB PSB: 9sec instead 47sec)
- New formats support added: INDEXED (8bps), BITMAP (1bps), GRAYSCALE (8, 16, 32bps), RGB (32bps)
- Should fix Bug https://bugs.kde.org/show_bug.cgi?id=397610
- Fix Bug https://bugs.kde.org/show_bug.cgi?id=428238
2022-04-04 17:22:45 +00:00
Daniel Novomesky
d3da56bba3 Add JXL to the list of supported formats 2021-11-17 20:06:11 +01:00
Kai Uwe Broulik
b79d1f222d Add plugin for animated Windows cursors (ANI) 2021-01-03 08:49:10 +00:00
Carl Schwan
54ed1dda27 Add AVIF to the list of supported formats 2020-12-16 08:36:39 +00: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
415850f3d3 Switch the brief descriptions around
Put the shorter description in metainfo.yaml, and the longer one in
README.md.
2014-08-15 18:41:16 +01:00
Denis Steckelmacher
af19f49711 Add metadata about the QMake and CMake packages installed by this framework and remove Links from README.md 2014-08-13 10:04:37 +02:00
Alex Merry
024db1f42b Move license information to its proper locations
The BSD license goes in the relevant CMake file, and
COPYING-CMAKE-SCRIPTS is removed.  README.md gets a License section
describing the overall license of the framework, as well as a note about
the CMake scripts.

As part of this commit, I release the existing autotest images (which I
created myself) as public domain (or license them under CC0 where public
domain does not apply), ensuring they are compatible with whatever
license the package is distributed under.

REVIEW: 115423
2014-02-04 12:30:22 +00:00
Alex Merry
b1de3377d0 README.md syntax fixes
Use a common list style (-, not *) and escape the # (or else Doxygen
complains).
2014-02-01 17:22:36 +00:00
Alex Merry
b71ede5c0f The file format is JPEG-2000; JasPer is the library 2014-01-16 21:34:13 +00:00
Alex Merry
aeff5cca5a Improve README.md
Organise and correct the format list.
2014-01-16 21:28:06 +00:00
Cornelius Schumacher
7177dba8db Update REAMDE 2014-01-12 20:45:38 +01:00
Alex Merry
7be60a7bd0 Fill out README.md file
Also delete the old README file, as README.md now contains the
information from it.
2013-12-22 16:12:02 +00:00
Aurélien Gâteau
8019c67d76 Add README.md and yaml files 2013-12-20 20:11:24 +01:00