digiKam
Digikam::PGFUtils Namespace Reference

Functions

QString libPGFVersion ()
 
bool loadPGFScaled (QImage &img, const QString &path, int maximumSize)
 
bool readPGFImageData (const QByteArray &data, QImage &img, bool verbose)
 
bool writePGFImageData (const QImage &image, QByteArray &data, int quality, bool verbose)
 
bool writePGFImageDataToStream (const QImage &image, CPGFStream &stream, int quality, UINT32 &nWrittenBytes, bool verbose)
 
bool writePGFImageFile (const QImage &image, const QString &filePath, int quality, bool verbose)
 

Function Documentation

◆ libPGFVersion()

DIGIKAM_EXPORT QString Digikam::PGFUtils::libPGFVersion ( )

Return a libpgf version string

Referenced by Digikam::LibsInfoDlg::LibsInfoDlg().

◆ loadPGFScaled()

DIGIKAM_EXPORT bool Digikam::PGFUtils::loadPGFScaled ( QImage &  img,
const QString &  path,
int  maximumSize 
)

Load a reduced version of PGF file

◆ readPGFImageData()

DIGIKAM_EXPORT bool Digikam::PGFUtils::readPGFImageData ( const QByteArray &  data,
QImage &  img,
bool  verbose = false 
)

PGF image data to QImage using memory stream. NOTE: Only use this method to manage PGF thumbnails stored in database.

◆ writePGFImageData()

DIGIKAM_EXPORT bool Digikam::PGFUtils::writePGFImageData ( const QImage &  image,
QByteArray &  data,
int  quality,
bool  verbose = false 
)

QImage to PGF image data using memory stream.

Parameters
qualityset compression ratio: 0 => lossless compression, as PNG. 1 => Not loss less compression, wavelets based... 2 => ... 3 => ... 4 => Same compression ratio near than JPEG quality=85. Image quality is valid for thumbnails. >= 5 => provide artifacts due to down-sampling. Do not use it... NOTE: Only use this method to manage PGF thumbnails stored in database.

References writePGFImageDataToStream().

◆ writePGFImageDataToStream()

bool Digikam::PGFUtils::writePGFImageDataToStream ( const QImage &  image,
CPGFStream &  stream,
int  quality,
UINT32 &  nWrittenBytes,
bool  verbose 
)

◆ writePGFImageFile()

DIGIKAM_EXPORT bool Digikam::PGFUtils::writePGFImageFile ( const QImage &  image,
const QString &  filePath,
int  quality,
bool  verbose = false 
)

QImage to PGF image data using file stream. Uses same params than writePGFImageData() excepted 'filePath' which is PGF target file path.

References writePGFImageDataToStream().