~ubuntu-branches/ubuntu/saucy/digikam/saucy

« back to all changes in this revision

Viewing changes to libs/dimg/dimg.h

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-12-21 23:19:11 UTC
  • mfrom: (1.2.33 upstream) (3.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20101221231911-z9jip7s5aht1jqn9
Tags: 2:1.7.0-1ubuntu1
* Merge from Debian Experimental. Remaining Ubuntu changes:
  - Export .pot name and copy to plugins in debian/rules
  - Version build-depends on kipi-plugins-dev to ensure build is against the
    same version on all archs
* Drop debian/patches/kubuntu_01_linker.diff, incoporated upstream
* Remove patches directory and unused patches

Show diffs side-by-side

added added

removed removed

Lines of Context:
118
118
 
119
119
    /** Load image using QByteArray as file path
120
120
     */
121
 
    explicit DImg(const QByteArray& filePath, DImgLoaderObserver *observer = 0,
 
121
    explicit DImg(const QByteArray& filePath, DImgLoaderObserver* observer = 0,
122
122
                  DRawDecoding rawDecodingSettings=DRawDecoding());
123
123
 
124
124
    /** Load image using QString as file path
125
125
     */
126
 
    explicit DImg(const QString& filePath, DImgLoaderObserver *observer = 0,
 
126
    explicit DImg(const QString& filePath, DImgLoaderObserver* observer = 0,
127
127
                  DRawDecoding rawDecodingSettings=DRawDecoding());
128
128
 
129
129
    /** Copy image: Creates a shallow copy that refers to the same shared data.
171
171
 
172
172
    /** Replaces image data of this object. Metadata is unchanged. Parameters like constructor above.
173
173
     */
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);
175
175
 
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).
181
181
     */
182
 
    void        putImageData(uchar *data, bool copyData = true);
 
182
    void        putImageData(uchar* data, bool copyData = true);
183
183
 
184
184
    /** Reset metadata and image data to null image
185
185
     */
194
194
     */
195
195
    uchar*      stripImageData();
196
196
 
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());
203
203
 
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);
206
206
 
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.
365
365
     */
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);
370
370
 
371
371
    /** QImage wrapper methods
372
372
     */
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.
405
405
     */
406
 
    QImage     pureColorMask(ExposureSettingsContainer *expoSettings);
 
406
    QImage     pureColorMask(ExposureSettingsContainer* expoSettings);
407
407
 
408
408
    /** Convert depth of image. Depth is bytesDepth * bitsDepth.
409
409
        If depth is 32, converts to 8 bits,
415
415
     */
416
416
    void       convertToSixteenBit();
417
417
    void       convertToEightBit();
418
 
    void       convertToDepthOfImage(const DImg *otherImage);
 
418
    void       convertToDepthOfImage(const DImg* otherImage);
419
419
 
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.
448
448
 
449
449
private:
450
450
 
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,