JXL: added ImageTransformation option

Let Qt rotate the image when the ImageAutotransform option is set to true.

In tests it also solves the image size control with the value returned by the options with certain rotations.
This commit is contained in:
Mirco Miranda
2024-07-30 22:46:52 +00:00
committed by Albert Astals Cid
parent 51921e8ee5
commit 219d9cb2c2
8 changed files with 126 additions and 17 deletions

View File

@ -267,10 +267,13 @@ int main(int argc, char **argv)
continue;
}
bool skipTest = false;
QFileInfo expFileInfo = timg.compareImage(skipTest);
if (skipTest) {
QTextStream(stdout) << "SKIP : " << fi.fileName() << ": image format not supported by current Qt version!\n";
TemplateImage::TestFlags flags = TemplateImage::None;
QString comment;
QFileInfo expFileInfo = timg.compareImage(flags, comment);
if ((flags & TemplateImage::SkipTest) == TemplateImage::SkipTest) {
if(comment.isEmpty())
comment = QStringLiteral("image format not supported by current Qt version!");
QTextStream(stdout) << "SKIP : " << fi.fileName() << QStringLiteral(": %1\n").arg(comment);
++skipped;
continue;
}
@ -291,7 +294,7 @@ int main(int argc, char **argv)
QImage expImage;
// inputImage is auto-rotated to final orientation
inputReader.setAutoTransform(true);
inputReader.setAutoTransform((flags & TemplateImage::DisableAutotransform) != TemplateImage::DisableAutotransform);
if (!expReader.read(&expImage)) {
QTextStream(stdout) << "ERROR: " << fi.fileName() << ": could not load " << expfilename << ": " << expReader.errorString() << "\n";