digikam
imageiface.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef IMAGEIFACE_H
00026 #define IMAGEIFACE_H
00027
00028
00029
00030 #include <QtCore/QString>
00031 #include <QtGui/QPixmap>
00032
00033
00034
00035 #include <klocale.h>
00036
00037
00038
00039 #include "dimg.h"
00040 #include "dcolor.h"
00041 #include "photoinfocontainer.h"
00042 #include "digikam_export.h"
00043 #include "globals.h"
00044
00045 class QPaintDevice;
00046
00047 namespace Digikam
00048 {
00049
00050 class ImageIfacePriv;
00051
00052 class DIGIKAM_EXPORT ImageIface
00053 {
00054 public:
00055
00056 explicit ImageIface(int w=0, int h=0);
00057 ~ImageIface();
00058
00062 void setPreviewType(bool useSelect=false);
00063
00067 bool previewType();
00068
00074 uchar* getPreviewImage() const;
00075
00078 DImg getPreviewImg();
00079
00085 uchar* getImageSelection() const;
00086
00091 uchar* getOriginalImage() const;
00092
00096 DImg* getOriginalImg() const;
00097
00106 void putOriginalImage(const QString& caller, uchar* data, int w=-1, int h=-1);
00107
00109 void putOriginalIccProfile(const IccProfile& profile);
00110
00118 void putImageSelection(const QString& caller, uchar* data);
00119
00128 void putPreviewImage(uchar* data);
00129
00131 void putPreviewIccProfile(const IccProfile& profile);
00132
00137 DColor getColorInfoFromOriginalImage(const QPoint& point);
00138 DColor getColorInfoFromPreviewImage(const QPoint& point);
00139 DColor getColorInfoFromTargetPreviewImage(const QPoint& point);
00140
00142 int originalWidth();
00143 int originalHeight();
00144 bool originalSixteenBit();
00145 bool originalHasAlpha();
00146
00148 IccProfile getOriginalIccProfile();
00149 QByteArray getExifFromOriginalImage();
00150 QByteArray getIptcFromOriginalImage();
00151 QByteArray getXmpFromOriginalImage();
00152
00154 PhotoInfoContainer getPhotographInformation() const;
00155
00157 int previewWidth();
00158 int previewHeight();
00159 bool previewHasAlpha();
00160 bool previewSixteenBit();
00161
00166 uchar* setPreviewImageSize(int w, int h) const;
00167
00169 int selectedWidth();
00170 int selectedHeight();
00171
00173 int selectedXOrg();
00174 int selectedYOrg();
00175
00177 void convertOriginalColorDepth(int depth);
00178
00181 QPixmap convertToPixmap(DImg& img);
00182
00187 void paint(QPaintDevice* device, int x, int y, int w, int h, QPainter* painter=0);
00188
00189 private:
00190
00191 ImageIfacePriv* const d;
00192 };
00193
00194 }
00195
00196 #endif