| digiKam Developer Documentation Professional Photo Management with the Power of Open Source

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Digikam::JPEGUtils::JpegRotator Class Reference

## Public Member Functions
| JpegRotator (const QString &file)
| Create a JpegRotator reading from the given file.
| ~JpegRotator ()
| Destructor.
bool | autoExifTransform ()
| Rotate the JPEG file's content according to the current orientation, resetting the current orientation to normal.
bool | exifTransform (const MetaEngineRotation &matrix)
| Rotate the given image by the given Matrix.
bool | exifTransform (TransformAction action)
| Rotate the given image by the given TransformAction.
void | setCurrentOrientation (MetaEngine::ImageOrientation orientation)
| Per default, the orientation is read from the metadata of the file.
void | setDestinationFile (const QString &dest)
| Set the destination file.
void | setDocumentName (const QString &documentName)
| Set the Exif document name of the destination file.

## Protected Member Functions
bool | performJpegTransform (TransformAction action, const QString &src, const QString &dest)
void | updateMetadata (const QString &fileName, const MetaEngineRotation &matrix)

## Protected Attributes
QString | m_destFile
QString | m_documentName
QString | m_file
DMetadata * | m_metadata = nullptr
MetaEngine::ImageOrientation | m_orientation = MetaEngine::ORIENTATION_UNSPECIFIED
QSize | m_originalSize

## Constructor & Destructor Documentation

## ◆ JpegRotator()

Digikam::JPEGUtils::JpegRotator::JpegRotator | ( | const QString & | file | ) |
| explicit

Per default, it will replace the file, read the current orientation from the metadata, and use the src file name as documentName.

## Member Function Documentation

## ◆ autoExifTransform()

bool Digikam::JPEGUtils::JpegRotator::autoExifTransform | ( |  | ) |

The final result of loading the image does not change.

## ◆ exifTransform() [1/2]

bool Digikam::JPEGUtils::JpegRotator::exifTransform | ( | const MetaEngineRotation & | matrix | ) |

The matrix describes the final transformation, it is not adjusted by current rotation.

## ◆ exifTransform() [2/2]

bool Digikam::JPEGUtils::JpegRotator::exifTransform | ( | TransformAction | action | ) |

The current orientation will be taken into account

## ◆ setCurrentOrientation()

void Digikam::JPEGUtils::JpegRotator::setCurrentOrientation | ( | MetaEngine::ImageOrientation | orientation | ) |

You can override this value

## ◆ setDestinationFile()

void Digikam::JPEGUtils::JpegRotator::setDestinationFile | ( | const QString & | dest | ) |

By default, the source file will be overwritten by atomic operation if the operation had succeeded.

## ◆ setDocumentName()

void Digikam::JPEGUtils::JpegRotator::setDocumentName | ( | const QString & | documentName | ) |

Default value is the source's file name