Commit Graph

752 Commits

Author SHA1 Message Date
Azhar Momin
bc8b5b56b1 Move fuzz target and build script into KImageFormats repository 2025-08-20 22:57:06 +05:30
Laurent Montel
35a1ed0227 GIT_SILENT: Bump kf ecm_set_disabled_deprecation_versions. Make sure that it compiles fine without kf 6.17 deprecated methods 2025-08-15 08:29:20 +02:00
Mirco Miranda
f63b082c85 IFF: add support for a different palette per line 2025-08-12 08:28:31 +02:00
Mirco Miranda
68cc915132 IFF: Fix possible undefined-shift 2025-08-09 11:46:05 +02:00
Mirco Miranda
e912a4ac9b RAW: Error out on malformed files
Internally, LibRaw often doesn't check the return values of various functions. It's not uncommon to find things like:

fseek(ifp, oAtom, SEEK_SET);
szAtom = get4();
... (more read operations without checking the result)

This means is up to us to error our properly when something went wrong. We do that by keeping an error counter and calling IOERROR once we've reached enough errors. IOERROR will throw an exception that will be internally caught by libraw itself.
2025-08-07 20:39:55 +00:00
Mirco Miranda
480ea8dba0 IFF: add support for RGBN/RGB8 image data and CAT chunk
Add the following features:
- RGB8 image data support (test case added)
- RGBN image data support ([Clouds.iff](/uploads/9db869350f74421bf1813fa7d4332f4f/Clouds.iff))
- CAT chunk support: you can have more than one image for file (test case added)
- Image transformation support via EXIF data

[RGBN/RGB8](https://wiki.amigaos.net/wiki/RGBN_and_RGB8_IFF_Image_Data) files are used in Impulse's Turbo Silver and Imagine.

Closes #34
2025-08-07 20:17:09 +00:00
Mirco Miranda
37e3c65a05 ILBM 64-bit extension support 2025-08-04 13:47:00 +02:00
Mirco Miranda
4b44f8474f Fix oss-fuzz compilation error 2025-08-04 13:46:16 +02:00
Mirco Miranda
c2a1d4b401 IFF: Fix halfbride detection, 1-bitplane colors and PBM line size calculation. It also ignore ZBuffer flag on Maya images (like Photoshop does) amd adds CMYK palette support. 2025-08-01 15:29:52 +02:00
Nicolas Fella
cd39c36621 Update version to 6.18.0 2025-08-01 13:33:36 +02:00
Nicolas Fella
1bfae6f171 Update dependency version to 6.17.0 v6.17.0-rc1 v6.17.0 2025-08-01 12:14:50 +02:00
Mirco Miranda
fd864e6f55 IFF: add support for uncompressed ACBM type 2025-07-24 07:37:58 +02:00
Laurent Montel
16b669d63d Bump kf ecm_set_disabled_deprecation_versions. Make sure that it compiles fine without kf 6.16 deprecated methods 2025-07-21 20:30:44 +02:00
Albert Astals Cid
457f3afa24 Fix CI
GIT_SILENT
2025-07-20 21:43:36 +00:00
Laurent Montel
080fd3c72d It compiles fine without qt 6.10 deprecated methods 2025-07-20 21:42:04 +02:00
Mirco Miranda
1d69f6af57 IFF: add mime types and extensions 2025-07-17 07:32:26 +02:00
Allen Winter
083680eb77 chunks.cpp - send info and warning messages to the iff logging category
For example:
`IFFChunk::innerFromDevice: unkwnown chunk "\x89PNG"`

becomes:
`kf.imageformats.plugins.iff: IFFChunk::innerFromDevice: unknown chunk "\x89PNG"`

bonus: we can filter out such messages if we want using QT_LOGGING_RULES

also note the spelling fix
2025-07-16 11:00:54 -04:00
Mirco Miranda
0a9f9fe106 IFF: support for Ham8, HalfBride, Pbm and ILBM 32-bits modes 2025-07-15 07:38:19 +02:00
Kai Uwe Broulik
21b3b890ec tga: Be less strict about palette
There's images in the wild that claim to not have a palette
but still have one.
2025-07-09 13:17:20 +02:00
Mirco Miranda
aef4bd7e1c Fix unused param in MicroExif::toByteArray() 2025-07-07 08:17:36 +02:00
Mirco Miranda
ea1983a7d1 IFF: Fix possible stack overflow 2025-07-05 09:59:06 +00:00
Nicolas Fella
775b53f1f6 Update version to 6.17.0 2025-07-04 18:28:45 +02:00
Nicolas Fella
02cf1502c0 Update dependency version to 6.16.0 v6.16.0-rc1 2025-07-04 16:29:08 +02:00
Mirco Miranda
f6c718a789 TGA: add indexed write support
Indexed images are saved as uncompressed TGA with color map.

Closes #30
2025-07-03 07:36:33 +02:00
Mirco Miranda
4f2f2425d3 IFF: read only support to Interchange Format Files
Read-only support for most common Interchange Format Files (IFF). Supports IFF saved by Photoshop for the Amiga and Maya platform and HAM6 coded files.

Closes #29
2025-07-01 21:59:03 +00:00
Kai Uwe Broulik
e6357c22f7 tga: Use Format_Indexed8 for indexed formats and support 32-bit BGRA colormap 2025-06-26 16:00:11 +02:00
Nicolas Fella
094177a01c Update version to 6.16.0 2025-06-06 16:31:26 +02:00
Nicolas Fella
7420f47c17 Update dependency version to 6.15.0 v6.15.0 v6.15.0-rc1 2025-06-06 15:19:44 +02:00
Xaver Hugl
888bca7387 cmake: add cmake config
That way, other projects can declare to have a runtime dependency on KImageFormats
2025-05-21 17:39:44 +02:00
Mirco Miranda
e3aefd2aa1 JXR: Restore device position after reading options 2025-05-14 02:50:03 +02:00
Mirco Miranda
aa8134ee0d README.md: minor fixes and improvements 2025-05-06 07:33:27 +02:00
Laurent Montel
9f09473aa0 It compiles fine without kf_6_13 deprecated methods 2025-05-04 21:31:49 +02:00
Mirco Miranda
62eb1d28cb Add README about autotests 2025-05-03 11:01:46 +02:00
Nicolas Fella
15bece40ec Update version to 6.15.0 2025-05-02 17:10:02 +02:00
Nicolas Fella
1b3d2afbe3 Update dependency version to 6.14.0 v6.14.0-rc1 v6.14.0 2025-05-02 16:02:43 +02:00
Mirco Miranda
850068c1dc JXR: fix compilation error on 32-bit systems 2025-04-22 08:01:02 +02:00
Mirco Miranda
6bf38ea638 Improved EXIF V3 compatibility (2)
This patch improve the string read/write in case of non ASCII encoding.
- When reading, checks for UTF-8 text even on ASCII data type. If it fails, Latin1 converter is used.
- When writing using V3 specs, a better check is done to identify 7-bit ASCII text.

Related to MR !358
2025-04-21 11:29:13 +00:00
Alessandro Astone
2adca7c0ca jxr: Use qsizetype for image size variables
Fixes type mismatch on 32-bit architectures.

/builddir/build/BUILD/kf6-kimageformats-6.13.0-build/kimageformats-6.13.0/src/imageformats/jxr.cpp: In member function ‘virtual bool JXRHandler::read(QImage*)’:
/builddir/build/BUILD/kf6-kimageformats-6.13.0-build/kimageformats-6.13.0/src/imageformats/jxr.cpp:994:88: error: no matching function for call to ‘min(qint64&, qsizetype)’
  994 |                 std::memcpy(img.scanLine(y), ba.data() + convStrideSize * y, (std::min)(convStrideSize, img.bytesPerLine()));
      |                                                                              ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2025-04-21 10:07:00 +02:00
Daniel Novomeský
dd69fdaea9 lib prefix on Android
Qt's original qtimageformats plug-ins use lib prefix too,
without the lib prefix, the image plug-ins don't work on Android.
2025-04-19 14:16:18 +00:00
Mirco Miranda
ae62ea3dfc Improved EXIF V3 compatibility
EXIF specs V3 added the UTF-8 data type. The MicroExif class now allows serializations to choose whether to support the V2 or V3 format. To maximize compatibility with old readers, even when V3 is set, the ASCII data type is used if possible.

The JXR plugin, based on TIFF V6 container, does not allow to use the V3 format (it does not recognize the UTF-8 data type) and therefore V2 has been forced. For all other plugins using MicroExif, it is now possible to save, e.g., descriptions in Japanese.

Please note that this patch is also a bugfix: when saving, version 3 was set but the strings were always saved as ASCII.
2025-04-18 13:53:12 +00:00
Nicolas Fella
9c47845f15 Update version to 6.14.0 2025-04-10 19:53:58 +02:00
Volker Krause
7c7fa73020 Remove conditions for no longer supported Qt versions 2025-04-08 18:46:13 +02:00
Albert Astals Cid
92e4271e84 GIT_SILENT Upgrade Qt6 version requirement to 6.7.0. 2025-04-07 10:13:41 +02:00
Laurent Montel
6f588c6fd3 Add missing include mocs v6.13.0-rc1 v6.13.0 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