119
119
/** Load image using QByteArray as file path
121
explicit DImg(const QByteArray& filePath, DImgLoaderObserver *observer = 0,
121
explicit DImg(const QByteArray& filePath, DImgLoaderObserver* observer = 0,
122
122
DRawDecoding rawDecodingSettings=DRawDecoding());
124
124
/** Load image using QString as file path
126
explicit DImg(const QString& filePath, DImgLoaderObserver *observer = 0,
126
explicit DImg(const QString& filePath, DImgLoaderObserver* observer = 0,
127
127
DRawDecoding rawDecodingSettings=DRawDecoding());
129
129
/** Copy image: Creates a shallow copy that refers to the same shared data.
172
172
/** Replaces image data of this object. Metadata is unchanged. Parameters like constructor above.
174
void putImageData(uint width, uint height, bool sixteenBit, bool alpha, uchar *data, bool copyData = true);
174
void putImageData(uint width, uint height, bool sixteenBit, bool alpha, uchar* data, bool copyData = true);
176
176
/** Overloaded function, provided for convenience, behaves essentially
177
177
like the function above if data is not 0.
179
179
If data is 0, the current data is deleted and the image is set to null
180
180
(But metadata unchanged).
182
void putImageData(uchar *data, bool copyData = true);
182
void putImageData(uchar* data, bool copyData = true);
184
184
/** Reset metadata and image data to null image
195
195
uchar* stripImageData();
197
bool load(const QString& filePath, DImgLoaderObserver *observer = 0,
197
bool load(const QString& filePath, DImgLoaderObserver* observer = 0,
198
198
DRawDecoding rawDecodingSettings=DRawDecoding());
199
199
bool load(const QString& filePath,
200
200
bool loadMetadata, bool loadICCData, bool loadUniqueHash,
201
DImgLoaderObserver *observer = 0,
201
DImgLoaderObserver* observer = 0,
202
202
DRawDecoding rawDecodingSettings=DRawDecoding());
204
bool save(const QString& filePath, FORMAT frm, DImgLoaderObserver *observer = 0);
205
bool save(const QString& filePath, const QString& format, DImgLoaderObserver *observer = 0);
204
bool save(const QString& filePath, FORMAT frm, DImgLoaderObserver* observer = 0);
205
bool save(const QString& filePath, const QString& format, DImgLoaderObserver* observer = 0);
207
207
/** Loads most parts of the meta information, but never the image data.
208
208
If loadMetadata is true, the metadata will be available with getComments, getExif, getIptc, getXmp .
363
363
and multiplication flags. See documentation of DColorComposer for more info.
364
364
For the other arguments, see documentation of bitBltImage above.
366
void bitBlendImage(DColorComposer *composer, const DImg* src,
366
void bitBlendImage(DColorComposer* composer, const DImg* src,
367
367
int sx, int sy, int w, int h, int dx, int dy,
368
368
DColorComposer::MultiplicationFlags multiplicationFlags =
369
DColorComposer::NoMultiplication);
369
DColorComposer::NoMultiplication);
371
371
/** QImage wrapper methods
403
403
/** Return a mask image where pure white and pure black pixels are over-colored.
404
404
This way is used to identify over and under exposed pixels.
406
QImage pureColorMask(ExposureSettingsContainer *expoSettings);
406
QImage pureColorMask(ExposureSettingsContainer* expoSettings);
408
408
/** Convert depth of image. Depth is bytesDepth * bitsDepth.
409
409
If depth is 32, converts to 8 bits,
416
416
void convertToSixteenBit();
417
417
void convertToEightBit();
418
void convertToDepthOfImage(const DImg *otherImage);
418
void convertToDepthOfImage(const DImg* otherImage);
420
420
/** Fill whole image with specified color.
421
421
The bit depth of the color must be identical to the depth of this image.
451
bool load(const QString& filePath, int loadFlags, DImgLoaderObserver *observer,
451
bool load(const QString& filePath, int loadFlags, DImgLoaderObserver* observer,
452
452
DRawDecoding rawDecodingSettings=DRawDecoding());
453
void copyMetaData(const DImgPrivate *src);
454
void copyImageData(const DImgPrivate *src);
453
void copyMetaData(const DImgPrivate* src);
454
void copyImageData(const DImgPrivate* src);
455
455
void setImageData(bool null, uint width, uint height, bool sixteenBit, bool alpha);
456
456
void setImageDimension(uint width, uint height);
457
457
int allocateData();
458
458
DImg(const DImg& image, int w, int h);
459
static void bitBlt(const uchar *src, uchar *dest,
459
static void bitBlt(const uchar* src, uchar* dest,
460
460
int sx, int sy, int w, int h, int dx, int dy,
461
461
uint swidth, uint sheight, uint dwidth, uint dheight,
462
462
bool sixteenBit, int sdepth, int ddepth);
463
static void bitBlend(DColorComposer *composer, const uchar *src, uchar *dest,
463
static void bitBlend(DColorComposer* composer, const uchar* src, uchar* dest,
464
464
int sx, int sy, int w, int h, int dx, int dy,
465
465
uint swidth, uint sheight, uint dwidth, uint dheight,
466
466
bool sixteenBit, int sdepth, int ddepth,