digiKam
|
Public Member Functions | |
bool | autoExifTransform () |
bool | exifTransform (const MetaEngineRotation &matrix) |
bool | exifTransform (TransformAction action) |
JpegRotator (const QString &file) | |
void | setCurrentOrientation (MetaEngine::ImageOrientation orientation) |
void | setDestinationFile (const QString &dest) |
void | setDocumentName (const QString &documentName) |
~JpegRotator () | |
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 |
MetaEngine::ImageOrientation | m_orientation |
QSize | m_originalSize |
|
explicit |
Create a JpegRotator reading from the given file. Per default, it will replace the file, read the current orientation from the metadata, and use the src file name as documentName.
References Digikam::MetaEngine::getItemOrientation(), Digikam::DMetadata::load(), m_documentName, m_metadata, and m_orientation.
Digikam::JPEGUtils::JpegRotator::~JpegRotator | ( | ) |
Destructor
References m_metadata.
bool Digikam::JPEGUtils::JpegRotator::autoExifTransform | ( | ) |
Rotate the JPEG file's content according to the current orientation, resetting the current orientation to normal. The final result of loading the image does not change.
References exifTransform(), and Digikam::MetaEngineRotation::NoTransformation.
Referenced by Digikam::FileActionMngrFileWorker::transform().
bool Digikam::JPEGUtils::JpegRotator::exifTransform | ( | const MetaEngineRotation & | matrix | ) |
Rotate the given image by the given Matrix. The matrix describes the final transformation, it is not adjusted by current rotation.
References Digikam::JPEGUtils::getJpegQuality(), Digikam::MetaEngine::hasSidecar(), Digikam::JPEGUtils::isJpegImage(), Digikam::DImg::JPEG, Digikam::DImg::load(), m_destFile, m_file, Digikam::Matrix::matrix(), Digikam::MetaEngineRotation::NoTransformation, Digikam::SafeTemporaryFile::open(), performJpegTransform(), Digikam::SafeTemporaryFile::safeFilePath(), Digikam::DImg::save(), Digikam::DImg::setAttribute(), Digikam::MetaEngine::sidecarPath(), Digikam::DImg::transform(), Digikam::MetaEngineRotation::transformations(), and updateMetadata().
bool Digikam::JPEGUtils::JpegRotator::exifTransform | ( | TransformAction | action | ) |
Rotate the given image by the given TransformAction. The current orientation will be taken into account
References m_orientation, and Digikam::Matrix::matrix().
Referenced by autoExifTransform(), and Digikam::FileActionMngrFileWorker::transform().
|
protected |
Referenced by exifTransform().
void Digikam::JPEGUtils::JpegRotator::setCurrentOrientation | ( | MetaEngine::ImageOrientation | orientation | ) |
Per default, the orientation is read from the metadata of the file. You can override this value
References m_orientation.
Referenced by Digikam::FileActionMngrFileWorker::transform().
void Digikam::JPEGUtils::JpegRotator::setDestinationFile | ( | const QString & | dest | ) |
Set the destination file. By default, the source file will be overwritten by atomic operation if the operation had succeeded.
References m_destFile.
void Digikam::JPEGUtils::JpegRotator::setDocumentName | ( | const QString & | documentName | ) |
Set the Exif document name of the destination file. Default value is the source's file name
References m_documentName.
|
protected |
References Digikam::DFileOperations::copyModificationTime(), Digikam::MetaEngine::getExifThumbnail(), Digikam::MetaEngine::getItemPreview(), Digikam::MetaEngineSettings::instance(), m_file, m_metadata, m_originalSize, Digikam::Matrix::matrix(), Digikam::MetaEngine::ORIENTATION_NORMAL, Digikam::DMetadata::save(), Digikam::MetaEngine::setExifThumbnail(), Digikam::MetaEngine::setItemDimensions(), Digikam::MetaEngine::setItemOrientation(), Digikam::MetaEngine::setItemPreview(), and Digikam::MetaEngineRotation::toTransform().
Referenced by exifTransform().
|
protected |
Referenced by exifTransform(), and setDestinationFile().
|
protected |
Referenced by JpegRotator(), and setDocumentName().
|
protected |
Referenced by exifTransform(), and updateMetadata().
|
protected |
Referenced by JpegRotator(), updateMetadata(), and ~JpegRotator().
|
protected |
Referenced by exifTransform(), JpegRotator(), and setCurrentOrientation().
|
protected |
Referenced by updateMetadata().