Metadata and image resolution write test

The goal of MR is to control the correct saving of metadata and resolution in plugins that support them.

- Modified the basic write test to verify that resolution and metadata are saved correctly.
- Verifies the correct functioning of MicroExif in plugins that use it to save metadata.
- EXR: fixed wrong vertical resolution (error found with this MR).
- Added EXR, JXR, JXL, PCX metadata test.
This commit is contained in:
Mirco Miranda
2025-01-16 07:14:27 +00:00
parent ac3591c7ea
commit ebb9c1ec18
7 changed files with 259 additions and 9 deletions

View File

@ -535,7 +535,7 @@ static void setMetadata(const QImage &image, Imf::Header &header)
if (image.dotsPerMeterX() && image.dotsPerMeterY()) {
header.insert("xDensity", Imf::FloatAttribute(image.dotsPerMeterX() * 2.54f / 100.f));
header.insert("pixelAspectRatio", Imf::FloatAttribute(float(image.dotsPerMeterX()) / float(image.dotsPerMeterY())));
header.insert("pixelAspectRatio", Imf::FloatAttribute(float(image.dotsPerMeterY()) / float(image.dotsPerMeterX())));
}
// set default chroma (default constructor ITU-R BT.709-3 -> sRGB)