digiKam
Digikam::MetaEnginePreviews Class Reference

Public Member Functions

int count () const
 Returns how many embedded previews are available. More...
 
QByteArray data (int index=0)
 
int dataSize (int index=0)
 
QString fileExtension (int index=0)
 
int height (int index=0)
 
QImage image (int index=0)
 
bool isEmpty ()
 Returns if there are any preview images available. More...
 
 MetaEnginePreviews (const QByteArray &imgData)
 
 MetaEnginePreviews (const QString &filePath)
 
QString mimeType (int index=0)
 
QString originalMimeType () const
 Returns the mimeType of the original image, detected from the file's content. More...
 
QSize originalSize () const
 Returns the pixel size of the original image, as read from the file (not the metadata). More...
 
int size () const
 
int width (int index=0)
 
 ~MetaEnginePreviews ()
 

Constructor & Destructor Documentation

◆ MetaEnginePreviews() [1/2]

Digikam::MetaEnginePreviews::MetaEnginePreviews ( const QString &  filePath)
explicit

Open the given file and scan for embedded preview images

References AutoPtr, image(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.

◆ MetaEnginePreviews() [2/2]

Digikam::MetaEnginePreviews::MetaEnginePreviews ( const QByteArray &  imgData)
explicit

Open the given image data and scan the image for embedded preview images.

References AutoPtr, image(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), and Digikam::s_metaEngineMutex.

◆ ~MetaEnginePreviews()

Digikam::MetaEnginePreviews::~MetaEnginePreviews ( )

Member Function Documentation

◆ count()

int Digikam::MetaEnginePreviews::count ( ) const

Returns how many embedded previews are available.

Referenced by data(), and size().

◆ data()

QByteArray Digikam::MetaEnginePreviews::data ( int  index = 0)

Retrieve the image data for the specified embedded preview image

References count(), image(), Digikam::MetaEngine::Private::printExiv2ExceptionError(), Digikam::s_metaEngineMutex, and size().

Referenced by image().

◆ dataSize()

int Digikam::MetaEnginePreviews::dataSize ( int  index = 0)

For each contained preview image, return the size of the image data in bytes, width and height of the preview, the mimeType and the file extension. Ensure that index < count(). Previews are sorted by width*height, largest first.

References size().

◆ fileExtension()

QString Digikam::MetaEnginePreviews::fileExtension ( int  index = 0)

References size().

◆ height()

int Digikam::MetaEnginePreviews::height ( int  index = 0)

References size().

◆ image()

QImage Digikam::MetaEnginePreviews::image ( int  index = 0)

Loads the data of the specified preview and creates a QImage from this data. Returns a null QImage if the loading failed.

References data().

Referenced by data(), and MetaEnginePreviews().

◆ isEmpty()

bool Digikam::MetaEnginePreviews::isEmpty ( )

Returns if there are any preview images available.

◆ mimeType()

QString Digikam::MetaEnginePreviews::mimeType ( int  index = 0)

References size().

◆ originalMimeType()

QString Digikam::MetaEnginePreviews::originalMimeType ( ) const

Returns the mimeType of the original image, detected from the file's content.

◆ originalSize()

QSize Digikam::MetaEnginePreviews::originalSize ( ) const

Returns the pixel size of the original image, as read from the file (not the metadata).

Referenced by Digikam::PreviewLoadingTask::execute().

◆ size()

int Digikam::MetaEnginePreviews::size ( ) const

References count().

Referenced by data(), dataSize(), fileExtension(), height(), mimeType(), and width().

◆ width()

int Digikam::MetaEnginePreviews::width ( int  index = 0)

References size().


The documentation for this class was generated from the following files: