![]() |
digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
|
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 |
|
explicit |
Per default, it will replace the file, read the current orientation from the metadata, and use the src file name as documentName.
| bool Digikam::JPEGUtils::JpegRotator::autoExifTransform | ( | ) |
The final result of loading the image does not change.
| bool Digikam::JPEGUtils::JpegRotator::exifTransform | ( | const MetaEngineRotation & | matrix | ) |
The matrix describes the final transformation, it is not adjusted by current rotation.
| bool Digikam::JPEGUtils::JpegRotator::exifTransform | ( | TransformAction | action | ) |
The current orientation will be taken into account
| void Digikam::JPEGUtils::JpegRotator::setCurrentOrientation | ( | MetaEngine::ImageOrientation | orientation | ) |
You can override this value
| void Digikam::JPEGUtils::JpegRotator::setDestinationFile | ( | const QString & | dest | ) |
By default, the source file will be overwritten by atomic operation if the operation had succeeded.
| void Digikam::JPEGUtils::JpegRotator::setDocumentName | ( | const QString & | documentName | ) |
Default value is the source's file name