digiKam
Digikam::DImgLoader Class Referenceabstract
+ Inheritance diagram for Digikam::DImgLoader:

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
}
 

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 Typenew_failureTolerant (quint64 w, quint64 h, uint typesPerPixel)
 
template<typename Type >
Q_INLINE_TEMPLATE Typenew_failureTolerant (size_t size)
 
virtual bool save (const QString &filePath, DImgLoaderObserver *const observer)=0
 
void setLoadFlags (LoadFlags flags)
 
virtual bool sixteenBit () const =0
 
virtual ~DImgLoader ()
 

Static Public Member Functions

static qint64 checkAllocation (qint64 fullSize)
 
static unsigned char * new_failureTolerant (quint64 w, quint64 h, uint typesPerPixel)
 
template<typename Type >
static Typenew_failureTolerant (quint64 w, quint64 h, uint typesPerPixel)
 
static unsigned char * new_failureTolerant (size_t unsecureSize)
 
template<typename Type >
static Typenew_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

bool checkExifWorkingColorSpace () const
 
 DImgLoader (DImg *const image)
 
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

DImgm_image
 
LoadFlags m_loadFlags
 

Member Enumeration Documentation

◆ LoadFlag

This is the list of loading modes usable by DImg image plugins

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.

Constructor & Destructor Documentation

◆ ~DImgLoader()

Digikam::DImgLoader::~DImgLoader ( )
virtual

◆ DImgLoader()

Digikam::DImgLoader::DImgLoader ( DImg *const  image)
explicitprotected

Member Function Documentation

◆ checkAllocation()

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

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

References Digikam::KMemoryInfo::AvailableMemory, Digikam::KMemoryInfo::bytes(), Digikam::KMemoryInfo::currentInfo(), and Digikam::KMemoryInfo::isValid().

Referenced by new_failureTolerant().

◆ checkExifWorkingColorSpace()

◆ granularity()

◆ hasAlpha()

◆ hasLoadedData()

bool Digikam::DImgLoader::hasLoadedData ( ) const
virtual

◆ imageBitsDepth()

◆ imageBytesDepth()

◆ imageData()

◆ imageEmbeddedText()

QMap< QString, QString > & Digikam::DImgLoader::imageEmbeddedText ( ) const
protected

References m_image.

◆ imageGetAttribute()

◆ imageGetEmbbededText()

QString Digikam::DImgLoader::imageGetEmbbededText ( const QString &  key) const
protected

◆ imageHasAlpha()

◆ imageHeight()

◆ imageNumBytes()

quint64 Digikam::DImgLoader::imageNumBytes ( ) const
protected

◆ imageSetAttribute()

◆ imageSetEmbbededText()

void Digikam::DImgLoader::imageSetEmbbededText ( const QString &  key,
const QString &  text 
)
protected

◆ imageSetIccProfile()

◆ imageSixteenBit()

◆ imageWidth()

◆ isReadOnly()

◆ load()

◆ loadingFailed()

◆ new_failureTolerant() [1/6]

unsigned char * Digikam::DImgLoader::new_failureTolerant ( quint64  w,
quint64  h,
uint  typesPerPixel 
)
static

◆ new_failureTolerant() [2/6]

template<typename Type >
static Type* Digikam::DImgLoader::new_failureTolerant ( quint64  w,
quint64  h,
uint  typesPerPixel 
)
static

◆ new_failureTolerant() [3/6]

template<typename Type >
Q_INLINE_TEMPLATE Type* Digikam::DImgLoader::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

◆ new_failureTolerant() [4/6]

template<typename Type >
Q_INLINE_TEMPLATE Type* Digikam::DImgLoader::new_failureTolerant ( size_t  size)

References checkAllocation().

◆ new_failureTolerant() [5/6]

◆ new_failureTolerant() [6/6]

template<typename Type >
static Type* Digikam::DImgLoader::new_failureTolerant ( size_t  unsecureSize)
static

◆ new_short_failureTolerant() [1/2]

unsigned short * Digikam::DImgLoader::new_short_failureTolerant ( quint64  w,
quint64  h,
uint  typesPerPixel 
)
static

◆ new_short_failureTolerant() [2/2]

unsigned short * Digikam::DImgLoader::new_short_failureTolerant ( size_t  unsecureSize)
static

◆ purgeExifWorkingColorSpace()

void Digikam::DImgLoader::purgeExifWorkingColorSpace ( )
protected

◆ readMetadata()

◆ save()

◆ saveMetadata()

◆ setLoadFlags()

void Digikam::DImgLoader::setLoadFlags ( LoadFlags  flags)

References m_loadFlags.

Referenced by Digikam::DImg::load().

◆ sixteenBit()

◆ storeColorProfileInMetadata()

Member Data Documentation

◆ m_image

◆ m_loadFlags


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