KExiv2Iface::RotationMatrix Class

class KExiv2Iface::RotationMatrix
Header: #include <KExiv2/RotationMatrix>
CMake: find_package(KExiv2Qt6 REQUIRED)
target_link_libraries(mytarget PRIVATE KExiv2Qt6)

Public Types

enum TransformationAction { NoTransformation, FlipHorizontal, FlipVertical, Rotate90, Rotate180 }

Public Functions

RotationMatrix()
RotationMatrix(KExiv2Iface::KExiv2::ImageOrientation exifOrientation)
RotationMatrix(KExiv2Iface::RotationMatrix::TransformationAction action)
KExiv2Iface::KExiv2::ImageOrientation exifOrientation() const
bool isNoTransform() const
QTransform toTransform() const
QList<KExiv2Iface::RotationMatrix::TransformationAction> transformations() const
bool operator!=(const KExiv2Iface::RotationMatrix &ma) const
KExiv2Iface::RotationMatrix &operator*=(KExiv2Iface::KExiv2::ImageOrientation exifOrientation)
KExiv2Iface::RotationMatrix &operator*=(KExiv2Iface::RotationMatrix::TransformationAction action)
KExiv2Iface::RotationMatrix &operator*=(QList<KExiv2Iface::RotationMatrix::TransformationAction> actions)
KExiv2Iface::RotationMatrix &operator*=(const KExiv2Iface::RotationMatrix &ma)
bool operator==(const KExiv2Iface::RotationMatrix &ma) const

Static Public Members

QTransform toTransform(KExiv2Iface::KExiv2::ImageOrientation orientation)

Detailed Description

Member Type Documentation

enum RotationMatrix::TransformationAction

This describes single transform primitives.

Note some of the defined Exif rotation flags combine two of these actions.

The enum values correspond to those defined as JXFORM_CODE in the often used the JPEG tool transupp.h.

ConstantValueDescription
KExiv2Iface::RotationMatrix::NoTransformation0No transformation
KExiv2Iface::RotationMatrix::FlipHorizontal1Horizontal flip
KExiv2Iface::RotationMatrix::FlipVertical2Vertical flip
KExiv2Iface::RotationMatrix::Rotate90590-degree clockwise rotation
KExiv2Iface::RotationMatrix::Rotate1806180-degree rotation
KExiv2Iface::RotationMatrix::Rotate1806270-degree clockwise (or 90 ccw)

Member Function Documentation

RotationMatrix::RotationMatrix()

Constructs the identity matrix (the matrix describing no transformation).

RotationMatrix::RotationMatrix(KExiv2Iface::KExiv2::ImageOrientation exifOrientation)

Returns the matrix corresponding to the given TransformationAction.

RotationMatrix::RotationMatrix(KExiv2Iface::RotationMatrix::TransformationAction action)

Returns the matrix corresponding to the given TransformationAction.

KExiv2Iface::KExiv2::ImageOrientation RotationMatrix::exifOrientation() const

Returns the Exif orienation flag describing this matrix.

Returns ORIENTATION_UNSPECIFIED if no flag matches this matrix.

bool RotationMatrix::isNoTransform() const

Returns true of this matrix describes no transformation (is the identity matrix).

QTransform RotationMatrix::toTransform() const

Returns a QTransform representing this matrix.

[static] QTransform RotationMatrix::toTransform(KExiv2Iface::KExiv2::ImageOrientation orientation)

Returns a QTransform for the given Exif orientation.

QList<KExiv2Iface::RotationMatrix::TransformationAction> RotationMatrix::transformations() const

Returns the actions described by this matrix. The order matters.

Not all possible matrices are supported, but all those that can be combined by Exif rotation flags and the transform actions above.

If isNoTransform() or the matrix is not supported returns an empty list.

bool RotationMatrix::operator!=(const KExiv2Iface::RotationMatrix &ma) const

KExiv2Iface::RotationMatrix &RotationMatrix::operator*=(KExiv2Iface::KExiv2::ImageOrientation exifOrientation)

Applies the given Exif orientation flag to this matrix.

KExiv2Iface::RotationMatrix &RotationMatrix::operator*=(KExiv2Iface::RotationMatrix::TransformationAction action)

Applies the given transform to this matrix.

KExiv2Iface::RotationMatrix &RotationMatrix::operator*=(QList<KExiv2Iface::RotationMatrix::TransformationAction> actions)

Applies the given transform actions to this matrix.

KExiv2Iface::RotationMatrix &RotationMatrix::operator*=(const KExiv2Iface::RotationMatrix &ma)

bool RotationMatrix::operator==(const KExiv2Iface::RotationMatrix &ma) const