File indexing completed on 2024-04-28 15:50:40
0001 /* 0002 SPDX-FileCopyrightText: 2007-2015 Gilles Caulier <caulier dot gilles at gmail dot com> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef DCRAW_INFO_CONTAINER_H 0008 #define DCRAW_INFO_CONTAINER_H 0009 0010 // Qt includes 0011 0012 #include <QString> 0013 #include <QDateTime> 0014 #include <QSize> 0015 #include <QDebug> 0016 0017 // Local includes 0018 0019 #include "libkdcraw_export.h" 0020 0021 namespace KDcrawIface 0022 { 0023 0024 /** A container for RAW image information 0025 */ 0026 class LIBKDCRAW_EXPORT DcrawInfoContainer 0027 { 0028 0029 public: 0030 0031 /** The RAW image orientation values 0032 */ 0033 enum ImageOrientation 0034 { 0035 ORIENTATION_NONE = 0, 0036 ORIENTATION_180 = 3, 0037 ORIENTATION_Mirror90CCW = 4, 0038 ORIENTATION_90CCW = 5, 0039 ORIENTATION_90CW = 6 0040 }; 0041 0042 public: 0043 0044 /** Standard constructor */ 0045 DcrawInfoContainer(); 0046 0047 /** Standard destructor */ 0048 virtual ~DcrawInfoContainer(); 0049 0050 /** Return 'true' if container is empty, else 'false' */ 0051 bool isEmpty(); 0052 0053 public: 0054 0055 /** True if RAW file include an ICC color profile. */ 0056 bool hasIccProfile; 0057 /** True is RAW file is decodable by dcraw. */ 0058 bool isDecodable; 0059 0060 /** The number of RAW colors. */ 0061 int rawColors; 0062 0063 /** The number of RAW images. */ 0064 int rawImages; 0065 0066 /** Black level from Raw histogram. */ 0067 unsigned int blackPoint; 0068 0069 /** Channel black levels from Raw histogram. */ 0070 unsigned int blackPointCh[4]; 0071 0072 /** White level from Raw histogram. */ 0073 unsigned int whitePoint; 0074 0075 /** Top margin of raw image. */ 0076 unsigned int topMargin; 0077 0078 /** Left margin of raw image. */ 0079 unsigned int leftMargin; 0080 0081 /** The raw image orientation */ 0082 ImageOrientation orientation; 0083 0084 /** The sensitivity in ISO used by camera to take the picture. */ 0085 float sensitivity; 0086 0087 /** ==> 1/exposureTime = exposure time in seconds. */ 0088 float exposureTime; 0089 /** ==> Aperture value in APEX. */ 0090 float aperture; 0091 /** ==> Focal Length value in mm. */ 0092 float focalLength; 0093 /** The pixel Aspect Ratio if != 1.0. NOTE: if == 1.0, dcraw do not show this value. */ 0094 float pixelAspectRatio; 0095 0096 /** White color balance settings. */ 0097 double daylightMult[3]; 0098 /** Camera multipliers used for White Balance adjustments */ 0099 double cameraMult[4]; 0100 0101 /** Camera Color Matrix */ 0102 float cameraColorMatrix1[3][4]; 0103 float cameraColorMatrix2[3][4]; 0104 float cameraXYZMatrix[4][3]; 0105 0106 /** The used Color Keys */ 0107 QString colorKeys; 0108 0109 /** The camera maker. */ 0110 QString make; 0111 /** The camera model. */ 0112 QString model; 0113 /** The artist name who have picture owner. */ 0114 QString owner; 0115 /** The demosaising filter pattern. */ 0116 QString filterPattern; 0117 /** The DNG version. NOTE: it is only shown with DNG RAW files. */ 0118 QString DNGVersion; 0119 0120 /** Date & time when the picture has been taken. */ 0121 QDateTime dateTime; 0122 0123 /** The image dimensions in pixels. */ 0124 QSize imageSize; 0125 0126 /** The thumb dimensions in pixels. */ 0127 QSize thumbSize; 0128 0129 /** The full RAW image dimensions in pixels. */ 0130 QSize fullSize; 0131 0132 /** The output dimensions in pixels. */ 0133 QSize outputSize; 0134 }; 0135 0136 //! qDebug() stream operator. Writes container @a c to the debug output in a nicely formatted way. 0137 LIBKDCRAW_EXPORT QDebug operator<<(QDebug dbg, const DcrawInfoContainer& c); 0138 0139 } // namespace KDcrawIface 0140 0141 #endif /* DCRAW_INFO_CONTAINER_H */