digiKam Developer Documentation: Digikam::DImgLoader Class Reference

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

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Digikam::DImgLoader Class Referenceabstract

## Public Types
enum | LoadFlag { LoadItemInfo = 1 , LoadMetadata = 2 , LoadICCData = 4 , LoadImageData = 8 , LoadUniqueHash = 16 , LoadImageHistory = 32 , LoadPreview = 64 , LoadAll = LoadItemInfo | LoadMetadata | LoadICCData | LoadImageData | LoadUniqueHash | LoadImageHistory }
| This is the list of loading modes usable by DImg image plugins. More...
typedef QFlags< LoadFlag > | LoadFlags

## Public Member Functions
virtual bool | hasAlpha () const =0
virtual bool | hasLoadedData () const
virtual bool | isReadOnly () const =0
virtual bool | load (const QString &filePath, DImgLoaderObserver *const observer)=0
template<typename Type >
Q_INLINE_TEMPLATE Type * | new_failureTolerant (quint64 w, quint64 h, uint typesPerPixel)
| Allows safe multiplication of requested pixel number and bytes per pixel, avoiding particularly 32 bits overflow and exceeding the size_t type.
template<typename Type >
Q_INLINE_TEMPLATE Type * | new_failureTolerant (size_t size)
virtual bool | save (const QString &filePath, DImgLoaderObserver *const observer)=0
void | setLoadFlags (LoadFlags flags)
virtual bool | sixteenBit () const =0

## Static Public Member Functions
static qint64 | checkAllocation (qint64 fullSize)
static int | convertCompressionForLibJpeg (int value)
static int | convertCompressionForLibPng (int value)
static unsigned char * | new_failureTolerant (quint64 w, quint64 h, uint typesPerPixel)
template<typename Type >
static Type * | new_failureTolerant (quint64 w, quint64 h, uint typesPerPixel)
static unsigned char * | new_failureTolerant (size_t unsecureSize)
template<typename Type >
static Type * | new_failureTolerant (size_t unsecureSize)
static unsigned short * | new_short_failureTolerant (quint64 w, quint64 h, uint typesPerPixel)
static unsigned short * | new_short_failureTolerant (size_t unsecureSize)

## Protected Member Functions
| DImgLoader (DImg *const image)
bool | checkExifWorkingColorSpace () const
virtual int | granularity (DImgLoaderObserver *const observer, int total, float progressSlice=1.0F)
int | imageBitsDepth () const
int | imageBytesDepth () const
unsigned char *& | imageData ()
QMap< QString, QString > & | imageEmbeddedText () const
QVariant | imageGetAttribute (const QString &key) const
QString | imageGetEmbbededText (const QString &key) const
bool | imageHasAlpha () const
unsigned int & | imageHeight ()
quint64 | imageNumBytes () const
void | imageSetAttribute (const QString &key, const QVariant &value)
void | imageSetEmbbededText (const QString &key, const QString &text)
void | imageSetIccProfile (const IccProfile &profile)
bool | imageSixteenBit () const
unsigned int & | imageWidth ()
void | loadingFailed ()
void | purgeExifWorkingColorSpace ()
virtual bool | readMetadata (const QString &filePath)
virtual bool | saveMetadata (const QString &filePath)
void | storeColorProfileInMetadata ()

## Protected Attributes
DImg * | m_image = nullptr
LoadFlags | m_loadFlags = LoadAll

## Member Enumeration Documentation

## ◆ LoadFlag

enum Digikam::DImgLoader::LoadFlag

Enumerator
LoadItemInfo | Load image information without image data. Image info as width and height
LoadMetadata | Image metadata.
LoadICCData | Image color profile.
LoadImageData | Full image data.
LoadUniqueHash | Image unique hash.
LoadImageHistory | Image version history.
LoadPreview | Special mode to load reduced image data. Load embedded preview image instead full size image
LoadAll | Helper to load all information, metadata and full image.

## Member Function Documentation

## ◆ checkAllocation()

qint64 Digikam::DImgLoader::checkAllocation | ( | qint64 | fullSize | ) |
| static

Returns
  -1 : unsupported platform 0 : parse failure from supported platform 1 : parse done with success from supported platform