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

@ -16,6 +16,13 @@
class TemplateImage
{
public:
enum TestFlag {
None = 0x0,
SkipTest = 0x1,
DisableAutotransform = 0x2
};
Q_DECLARE_FLAGS(TestFlags, TestFlag)
/*!
* \brief TemplateImage
* \param fi The image to test.
@ -42,10 +49,10 @@ public:
/*!
* \brief compareImage
* \param skipTest True if the test should be skipped (e.g. image format not supported by current Qt version).
* \param flags Flags for modifying test behavior (e.g. image format not supported by current Qt version).
* \return The template image to use for the comparison.
*/
QFileInfo compareImage(bool &skipTest) const;
QFileInfo compareImage(TestFlags &flags, QString& comment) const;
/*!
* \brief suffixes
@ -62,13 +69,15 @@ private:
/*!
* \brief jsonImage
* \param skipTest True if the test should be skipped (not supported).
* \param flags Flags for modifying test behavior.
* \return The template image read from the corresponding JSON.
*/
QFileInfo jsonImage(bool &skipTest) const;
QFileInfo jsonImage(TestFlags &flags, QString& comment) const;
private:
QFileInfo m_fi;
};
Q_DECLARE_OPERATORS_FOR_FLAGS(TemplateImage::TestFlags)
#endif // TEMPLATEIMAGE_H