digiKam
|
Classes | |
class | Private |
Public Member Functions | |
void | cancel () |
bool | decodeHalfRAWImage (const QString &filePath, const DRawDecoderSettings &DRawDecoderSettings, QByteArray &imageData, int &width, int &height, int &rgbmax) |
bool | decodeRAWImage (const QString &filePath, const DRawDecoderSettings &DRawDecoderSettings, QByteArray &imageData, int &width, int &height, int &rgbmax) |
DRawDecoder () | |
bool | extractRAWData (const QString &filePath, QByteArray &rawData, DRawInfo &identify, unsigned int shotSelect=0) |
~DRawDecoder () override | |
Static Public Member Functions | |
static bool | isRawFile (const QUrl &url) |
static int | librawUseGomp () |
static QString | librawVersion () |
static bool | loadEmbeddedPreview (QByteArray &imgData, const QBuffer &inBuffer) |
static bool | loadEmbeddedPreview (QByteArray &imgData, const QString &path) |
static bool | loadEmbeddedPreview (QImage &image, const QString &path) |
static bool | loadFullImage (QImage &image, const QString &path, const DRawDecoderSettings &settings=DRawDecoderSettings()) |
static bool | loadHalfPreview (QByteArray &imgData, const QBuffer &inBuffer) |
static bool | loadHalfPreview (QByteArray &imgData, const QString &path) |
static bool | loadHalfPreview (QImage &image, const QString &path) |
static bool | loadRawPreview (QByteArray &imgData, const QBuffer &inBuffer) |
static bool | loadRawPreview (QByteArray &imgData, const QString &path) |
static bool | loadRawPreview (QImage &image, const QString &path) |
static bool | rawFileIdentify (DRawInfo &identify, const QString &path) |
static QString | rawFiles () |
static QStringList | rawFilesList () |
static int | rawFilesVersion () |
static QStringList | supportedCamera () |
Protected Member Functions | |
virtual bool | checkToCancelWaitingData () |
virtual void | setWaitingDataProgress (double value) |
Protected Attributes | |
bool | m_cancel |
DRawDecoderSettings | m_decoderSettings |
Friends | |
class | Private |
Digikam::DRawDecoder::DRawDecoder | ( | ) |
Standard constructor.
|
override |
Standard destructor.
References cancel().
void Digikam::DRawDecoder::cancel | ( | ) |
To cancel 'decodeHalfRAWImage' and 'decodeRAWImage' methods running in a separate thread.
References m_cancel.
Referenced by ~DRawDecoder().
|
protectedvirtual |
Re-implement this method to control the cancelisation of loop which wait data from RAW decoding process with your proper environment. By default, this method check if m_cancel is true.
References m_cancel.
bool Digikam::DRawDecoder::decodeHalfRAWImage | ( | const QString & | filePath, |
const DRawDecoderSettings & | DRawDecoderSettings, | ||
QByteArray & | imageData, | ||
int & | width, | ||
int & | height, | ||
int & | rgbmax | ||
) |
Extract a small size of decode RAW data from 'filePath' picture file using 'DRawDecoderSettings' settings. This is a cancelable method which require a class instance to run because RAW pictures decoding can take a while.
This method return:
- A byte array container 'imageData' with picture data. Pixels order is RGB. Color depth can be 8 or 16. In 8 bits you can access to color component using (uchar*), in 16 bits using (ushort*). - Size size of image in number of pixels ('width' and 'height'). - The max average of RGB components from decoded picture. - 'false' is returned if decoding failed, else 'true'.
References Digikam::DRawDecoderSettings::halfSizeColorImage, Digikam::DRawDecoder::Private::loadFromLibraw(), and m_decoderSettings.
bool Digikam::DRawDecoder::decodeRAWImage | ( | const QString & | filePath, |
const DRawDecoderSettings & | DRawDecoderSettings, | ||
QByteArray & | imageData, | ||
int & | width, | ||
int & | height, | ||
int & | rgbmax | ||
) |
Extract a full size of RAW data from 'filePath' picture file using 'DRawDecoderSettings' settings. This is a cancelable method which require a class instance to run because RAW pictures decoding can take a while.
This method return:
- A byte array container 'imageData' with picture data. Pixels order is RGB. Color depth can be 8 or 16. In 8 bits you can access to color component using (uchar*), in 16 bits using (ushort*). - Size size of image in number of pixels ('width' and 'height'). - The max average of RGB components from decoded picture. - 'false' is returned if decoding failed, else 'true'.
References Digikam::DRawDecoder::Private::loadFromLibraw(), and m_decoderSettings.
bool Digikam::DRawDecoder::extractRAWData | ( | const QString & | filePath, |
QByteArray & | rawData, | ||
DRawInfo & | identify, | ||
unsigned int | shotSelect = 0 |
||
) |
Extract Raw image data undemosaiced and without post processing from 'filePath' picture file. This is a cancelable method which require a class instance to run because RAW pictures loading can take a while.
This method return:
- A byte array container 'rawData' with raw data. - All info about Raw image into 'identify' container. - 'false' is returned if loading failed, else 'true'.
References Digikam::DRawDecoder::Private::fillIndentifyInfo(), Digikam::DRawInfo::isDecodable, m_cancel, rawFiles(), Digikam::s_exifParserCallbackForLibRaw(), Digikam::s_progressCallbackForLibRaw(), and Digikam::DRawDecoder::Private::setProgress().
|
static |
References rawFiles().
Referenced by Digikam::DItemsList::slotAddImages().
|
static |
Return true or false if LibRaw use parallel demosaicing or not (libgomp support). Return -1 if undefined.
Referenced by Digikam::LibsInfoDlg::LibsInfoDlg().
|
static |
Return LibRaw version string.
Referenced by Digikam::LibsInfoDlg::LibsInfoDlg(), and Digikam::DRawDecoderWidget::setup().
|
static |
Get the embedded JPEG preview image from RAW image passed in QBuffer as a QByteArray which will include Exif Data. This is fast and non cancelable. This method does not require a class instance to run.
References Digikam::DRawDecoder::Private::loadEmbeddedPreview(), and rawFiles().
|
static |
Get the embedded JPEG preview image from RAW picture as a QByteArray which will include Exif Data. This is fast and non cancelable. This method does not require a class instance to run.
References Digikam::DRawDecoder::Private::loadEmbeddedPreview(), and rawFiles().
Referenced by loadEmbeddedPreview(), and loadRawPreview().
|
static |
Get the embedded JPEG preview image from RAW picture as a QImage. This is fast and non cancelable This method does not require a class instance to run.
References loadEmbeddedPreview().
|
static |
Get the full decoded RAW picture. This is a more slower than loadHalfPreview() method and non cancelable. This method does not require a class instance to run.
References rawFiles(), and Digikam::DRawDecoderSettings::sixteenBitsImage.
|
static |
Get the half decoded RAW picture passed in QBuffer as JPEG data in QByteArray. This is slower than loadEmbeddedPreview() method and non cancelable. This method does not require a class instance to run.
References Digikam::DRawDecoder::Private::loadHalfPreview(), and rawFiles().
|
static |
Get the half decoded RAW picture as JPEG data in QByteArray. This is slower than loadEmbeddedPreview() method and non cancelable. This method does not require a class instance to run.
References Digikam::DRawDecoder::Private::loadHalfPreview(), and rawFiles().
|
static |
Get the half decoded RAW picture. This is slower than loadEmbeddedPreview() method and non cancelable. This method does not require a class instance to run.
References Digikam::DRawDecoder::Private::loadHalfPreview(), and rawFiles().
Referenced by loadRawPreview().
|
static |
Get the preview of RAW picture passed in QBuffer as a QByteArray holding JPEG data. It tries loadEmbeddedPreview() first and if it fails, calls loadHalfPreview().
|
static |
Get the preview of RAW picture as a QByteArray holding JPEG data. It tries loadEmbeddedPreview() first and if it fails, calls loadHalfPreview().
|
static |
Get the preview of RAW picture as a QImage. It tries loadEmbeddedPreview() first and if it fails, calls loadHalfPreview().
References loadEmbeddedPreview(), and loadHalfPreview().
Referenced by Digikam::UMSCamera::getThumbnail(), and Digikam::BatchTool::loadToDImg().
|
static |
Get the camera settings which have taken RAW file. Look into rawinfo.h for more details. This is a fast and non cancelable method which do not require a class instance to run.
References Digikam::DRawDecoder::Private::fillIndentifyInfo(), Digikam::DRawInfo::isDecodable, and rawFiles().
Referenced by Digikam::PreviewLoadingTask::execute(), Digikam::DRawDecoder::Private::loadFromLibraw(), Digikam::DMetadata::loadUsingRawEngine(), and DigikamGenericHtmlGalleryPlugin::GalleryElementFunctor::operator()().
|
static |
Return the string of all RAW file type mime supported.
References Digikam::s_rawFileExtensions().
Referenced by extractRAWData(), isRawFile(), Digikam::BatchTool::isRawFile(), Digikam::isReadableImageFile(), loadEmbeddedPreview(), loadFullImage(), loadHalfPreview(), rawFileIdentify(), rawFilesList(), Digikam::ItemPropertiesSideBar::setImagePropertiesInformation(), and Digikam::supportedImageMimeTypes().
|
static |
Return the list of all RAW file type mime supported, as a QStringList, without wildcard and suffix dot.
References rawFiles().
Referenced by Digikam::ApplicationSettings::getRawFileFilter().
|
static |
Returns a version number for the list of supported RAW file types. This version is incremented if the list of supported formats has changed between library releases.
References Digikam::s_rawFileExtensionsVersion().
|
protectedvirtual |
Re-implement this method to control the pseudo progress value during RAW decoding (when dcraw run with an internal loop without feedback) with your proper environment. By default, this method does nothing. Progress value average for this stage is 0%-n%, with 'n' == 40% max (see setWaitingDataProgress() method).
|
static |
Provide a list of supported RAW Camera name.
Referenced by Digikam::RawCameraDlg::RawCameraDlg().
|
friend |
|
protected |
Used internally to cancel RAW decoding operation. Normally, you don't need to use it directly, excepted if you derivated this class. Usual way is to use cancel() method
Referenced by cancel(), checkToCancelWaitingData(), and extractRAWData().
|
protected |
The settings container used to perform RAW pictures decoding. See 'drawdecodingsetting.h' for details.
Referenced by decodeHalfRAWImage(), decodeRAWImage(), DigikamRAWDImgPlugin::DImgRAWLoader::DImgRAWLoader(), DigikamRAWDImgPlugin::DImgRAWLoader::load(), and DigikamRAWDImgPlugin::DImgRAWLoader::sixteenBit().