Commit Graph
27 Commits
Author SHA1 Message Date
Mirco Miranda 6559bf8994 Treat 3-channel MCH images as CMY images 2023-07-03 12:34:54 +02:00
Mirco MirandaandChristoph Cullmann 93adb22632 raw: change the use of the quality parameter
- Standardized the quality parameter between 0-100
- The value -1 is the default value of Qt plugins and is managed
- Negative values other than -1 are used as flags to activate the custom mode
2023-05-17 17:45:23 +00:00
Mirco MirandaandAlbert Astals Cid d57ff91f8b 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.
2023-05-12 08:53:50 +00:00
Mirco Miranda edd6adcbac Avoid unnecessary conversions 2023-05-10 15:34:14 +02:00
Mirco MirandaandAlbert Astals Cid e60dfd4968 pcx: multiple fixes
- Fix wrong RGB channel order if image format is other than (A)RGB32
- Write right resolution
- Set right resolution on image load
- Return false on write error
- Save images with depth greater than 24-bits
2023-05-10 11:43:04 +00:00
Mirco MirandaandAlbert Astals Cid 41f0411b62 PSD: fix test failure on some systems and fix wrong check on alpha conversion
- Fix PSD alpha conversion
- Fix autoread test to use also TIFF images
2023-04-18 22:14:41 +00:00
Mirco MirandaandAlbert Astals Cid 402dfb5de3 psd: Fix alpha blending
PSD files are saved with as alpha premultiplied. The problem is that alpha refers to white instead of black so it requires transformation formulas. Then, to conver PS premultiplied to QImage premultiplied you have to use the following formula:

* V = Alpha + Vps - Max (C, M, Y, K, R, G, B, Gray, L\* components)
* V = Vps + (Alpha - Max + 1) / 2 (a\*, b\* components)

Where Max is the maximum value depending on the image depth and Vps is the valued read from the file.
2023-03-29 17:55:55 +00:00
Mirco MirandaandAlbert Astals Cid 560d0483ae Replace deprecated functions
Improve the code by replacing deprecated functions as suggested by the Qt documentation.
2023-01-31 21:32:30 +00:00
Mirco MirandaandAlbert Astals Cid 21211cd63b psd: LAB conversion speed improved
Using an approximated pow function improves the conversion speed of LAB images by more than 50% without an appreciable visual difference.
2023-01-27 23:19:48 +00:00
Mirco MirandaandAlbert Astals Cid 5cc7a2b45c psd: native 32-bits RGB support
This patch maps RGB 32-bits PSD to QImage::Format_RGBA32FPx4 or QImage::Format_RGBX32FPx4.
2023-01-26 23:17:09 +00:00
Mirco MirandaandAlbert Astals Cid 14742cb502 PCX: Fix reading of the extended palette
The VGA palette starts 769 bytes before the end of the file. There may be PADs between the end of the image and the start of the palette.

BUG: 463951
2023-01-11 22:56:38 +00:00
Mirco Miranda a3049f6740 Fix missing DCI-P3 color space set 2022-11-24 15:02:31 +01:00
Mirco MirandaandAlbert Astals Cid dcab3a06ab raw: LibRaw_QIODevice::read: fixed possible partial reading of an item
- If the size of an item is greater than 1 byte, it must be ensured that it is not partially read.
- In many readings, LibRAW gives an error if a partial number of items are read so I always try to read everything.
2022-11-19 10:14:16 +00:00
Mirco Miranda 361f9e867e PSD multichannel testcases 2022-11-15 16:25:22 +00:00
Mirco Miranda 35883aa604 Support to MCH with 4+ channels (treat as CMYK) 2022-11-15 16:25:22 +00:00
Mirco MirandaandDaniel Novomeský 50846f224f avif: Check if encoder/decoder is available in capabilities()
The plugin can be compiled even with decoder libraries only. In a similar way of HEIC plugin I check if an encoder or a decoder is available.
2022-11-15 13:14:09 +00:00
Mirco MirandaandAlbert Astals Cid 181eb253c6 ANI partial test and PIC test added 2022-10-02 06:01:23 +00:00
Mirco MirandaandAlbert Astals Cid ea14882ff7 Fix messages 2022-10-02 06:01:23 +00:00
Mirco MirandaandAlbert Astals Cid 2f27dff48b Fix maximum number of channels (testcase added) 2022-09-22 21:17:10 +00:00
Mirco Miranda 6074c4d6fd Use right type on enums 2022-07-29 07:46:10 +02:00
Mirco Miranda 3d5090593c Improved detection of alpha channel on CMYK images 2022-06-30 06:56:21 +00:00
Mirco MirandaandAlbert Astals Cid cff2604cf9 XCF: Support to QImageIOHandler::Size option 2022-04-29 13:23:20 +00:00
Mirco Miranda f8a251e268 Support to QImageIOHandler::Size option 2022-04-28 08:52:18 +02:00
Mirco MirandaandAlbert Astals Cid 52134fc2e9 QByteArray resize removal
- Removed QByteArray resize with potentially large numbers as in merge request !66
2022-04-14 23:04:58 +00:00
Mirco MirandaandAlbert Astals Cid 44fd6b7bc0 psd: duotone read
- New format added: Duotone
- Fix float to int conversion round issue
2022-04-11 21:07:23 +00:00
Mirco MirandaandAlbert Astals Cid 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
Mirco MirandaandAlbert Astals Cid 3e751dd80d Fix XCF parasites metadata in QImage and support to ICC profile
- Fix parasite "gimp-comment" not set due to null QImage
- Support to parasite "icc-profile" using Qt 5.14+ API
- Added parasite "gimp-image-metadata" as QImage metadata "XML:org.gimp.xml"
- Added a XCF with XML metadata and icc prifile embedded in autotest folder (generated by GIMP 2.10.30)
- Tested with Qt 5.15.2 and Qt 6.2.3 under Windows and Qt 6.2.3 under macOS
2022-03-23 23:34:33 +00:00