|
MythTV master
|
Encapsulates Exif orientation processing. More...
#include <libmythmetadata/imagemetadata.h>
Public Member Functions | |
| Orientation (int composite) | |
| Orientation (int current, int file) | |
| int | Composite () const |
| Encode original & current orientation to a single Db field. More... | |
| int | Transform (int transform) |
| Adjust orientation to apply a transform to an image. More... | |
| int | GetCurrent () const |
| Determines orientation required for an image. More... | |
| QString | Description () const |
| Generate text description of orientation. More... | |
Static Public Member Functions | |
| static int | FromRotation (const QString °rees) |
| Convert degrees of rotation into Exif orientation code. More... | |
Private Member Functions | |
| int | Apply (int transform) const |
| Adjust current orientation code to apply a transform to an image. More... | |
Static Private Member Functions | |
| static QString | AsText (int orientation) |
| Converts orientation code to text description for info display. More... | |
Private Attributes | |
| int | m_current |
| The orientation to use: the file orientation with user transformations applied. More... | |
| int | m_file |
| The orientation of the raw file image, as specified by the camera. More... | |
Encapsulates Exif orientation processing.
The exif code indicates how the raw image should be rotated/mirrored in order to display correctly. This manipulation is expensive, so done once only. User transformations are applied to the code to achieve the required effect. Both file orientation and current orientation are stored in the Db (together) to cope with deviant Qt versions. This composite code is 2-digits where 1st = current orientation, 2nd = original file orientation
Definition at line 62 of file imagemetadata.h.
|
inlineexplicit |
Definition at line 66 of file imagemetadata.h.
|
inline |
Definition at line 68 of file imagemetadata.h.
|
private |
Adjust current orientation code to apply a transform to an image.
When displayed the image will be orientated iaw its orientation code. The transform is effected by applying the reverse transform to the orientation code.
| transform | Rotation/flip to apply |
Definition at line 55 of file imagemetadata.cpp.
Referenced by Transform().
|
staticprivate |
Converts orientation code to text description for info display.
| orientation | Exif code |
Definition at line 183 of file imagemetadata.cpp.
Referenced by Description().
|
inline |
Encode original & current orientation to a single Db field.
Definition at line 71 of file imagemetadata.h.
Referenced by ImageScanThread< DBFS >::SyncFile(), and Transform().
| QString Orientation::Description | ( | ) | const |
Generate text description of orientation.
Reports code & its interpretation of file orientation and, if different, the Db orientation
Definition at line 169 of file imagemetadata.cpp.
Referenced by ReadMetaThread::run().
|
static |
Convert degrees of rotation into Exif orientation code.
| degrees | CW rotation required to show video correctly |
Definition at line 153 of file imagemetadata.cpp.
Referenced by VideoMetaData::GetOrientation().
| int Orientation::GetCurrent | ( | ) | const |
Determines orientation required for an image.
Definition at line 40 of file imagemetadata.cpp.
Referenced by ThumbThread< DBFS >::CreateThumbnail(), Slide::LoadSlide(), and ImageScanThread< DBFS >::SyncFile().
| int Orientation::Transform | ( | int | transform | ) |
Adjust orientation to apply a transform to an image.
| transform | Rotation/flip/reset to apply |
Definition at line 29 of file imagemetadata.cpp.
Referenced by ImageHandler< DBFS >::HandleTransform().
|
private |
The orientation to use: the file orientation with user transformations applied.
Definition at line 84 of file imagemetadata.h.
Referenced by Apply(), Description(), GetCurrent(), and Transform().
|
private |
The orientation of the raw file image, as specified by the camera.
Definition at line 86 of file imagemetadata.h.
Referenced by Apply(), and Description().