kimageformats/autotests/read
Mirco Miranda 49060026b7 Read test: added perceptive fuzziness
Added a new parameter to the read tests called `perceptive-fuzz`.
The parameter, when active, modifies the fuzziness value based on the alpha value of the pixel. The more transparent the pixel, the more the fuzziness value increases.

We have found that some image manipulation functions give different results depending on the architecture (we think it is differences in rounding). These differences can become problematic with small alpha values ​​when there are several image conversions from normal alpha to premultiplied alpha (and vice versa).
In particular, the offending plugin is XCF.

The parameter should be set if and only if necessary. CMakeList has not been modified to allow it to be enabled on all format images (you can still try it from the command line). To use it, you need to set it in the JSON file of the image that has problems (after careful analysis).

More info about the issue on #18 

This MR also fixes a bug in `fazzeq()`: it only compared 1/4 of the image.

Below is the same XCF image rendered on AMD64 and PowerPC:

- AMD64:

![image](/uploads/7815ee49fac9b06d08bf1e0e3879f16e/image.png)

- PowerPC:

![image](/uploads/d7432902d638f6caf9589ebb4ad99827/image.png)

The image is visually the same because the differences are with very low alpha and therefore are negligible. The patch proposed with this MR is useful in these cases.
2025-01-24 13:07:32 +00:00
..
avci HEIF plug-in extended to read AVCI format 2024-12-29 23:44:18 +01:00
avif Add AVIF test files with rotation and mirror operations 2022-10-12 15:39:27 +02:00
dds DDS: Fix warning in qfloat16 and test failure on PowerPC 2025-01-15 17:45:57 +00:00
eps Add simple autotests 2014-02-03 15:03:29 +00:00
exr More metadata read tests 2025-01-16 23:03:37 +00:00
hdr More metadata read tests 2025-01-16 23:03:37 +00:00
heif Add plugin for High Efficiency Image File Format (HEIF) 2021-02-25 11:52:00 +01:00
hej2 HEIF plug-in extended to support HEJ2 format 2023-12-07 13:26:43 +01:00
jp2 Add JPEG 2000 support 2025-01-05 10:36:21 +00:00
jxl PSD: added support to EXIF metadata 2025-01-15 23:26:02 +00:00
jxr More metadata read tests 2025-01-16 23:03:37 +00:00
kra Add kra and ora imageio plugins (read-only) 2016-01-31 15:01:32 +01:00
ora Add kra and ora imageio plugins (read-only) 2016-01-31 15:01:32 +01:00
pcx More metadata read tests 2025-01-16 23:03:37 +00:00
pfm PFM: fix error when loading images with comments 2024-12-12 09:48:34 +00:00
psd PSD: improved option support 2025-01-18 22:32:15 +00:00
pxr PXR: Pixar raster read only support 2024-06-12 22:42:08 +00:00
qoi qoi: fix buffer overflow 2023-08-18 14:09:00 +00:00
ras ras: rle decode 2023-08-29 09:11:35 +00:00
raw More metadata read tests 2025-01-16 23:03:37 +00:00
rgb RGB: added options support 2024-08-25 21:00:08 +00:00
sct More metadata read tests 2025-01-16 23:03:37 +00:00
tga TGA: Fixed GrayA image loading error 2024-10-24 15:07:44 +00:00
xcf Read test: added perceptive fuzziness 2025-01-24 13:07:32 +00:00