File indexing completed on 2025-01-05 03:57:12
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2007-05-02 0007 * Description : RAW file identification information container 0008 * Note: this container permit to not expose the rest of 0009 * digiKam code to libraw API and use Qt internal 0010 * containers when possible. 0011 * 0012 * SPDX-FileCopyrightText: 2007-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0013 * 0014 * SPDX-License-Identifier: GPL-2.0-or-later 0015 * 0016 * ============================================================ */ 0017 0018 #ifndef DIGIKAM_DRAW_INFO_H 0019 #define DIGIKAM_DRAW_INFO_H 0020 0021 // Qt includes 0022 0023 #include <QByteArray> 0024 #include <QString> 0025 #include <QDateTime> 0026 #include <QSize> 0027 #include <QDebug> 0028 #include <QImage> 0029 0030 // Local includes 0031 0032 #include "digikam_export.h" 0033 0034 namespace Digikam 0035 { 0036 0037 class DIGIKAM_EXPORT DRawInfo 0038 { 0039 0040 public: 0041 0042 /** 0043 * The RAW image orientation values 0044 */ 0045 enum ImageOrientation 0046 { 0047 ORIENTATION_NONE = 0, 0048 ORIENTATION_180 = 3, 0049 ORIENTATION_Mirror90CCW = 4, 0050 ORIENTATION_90CCW = 5, 0051 ORIENTATION_90CW = 6 0052 }; 0053 0054 public: 0055 0056 /** 0057 * Standard constructor 0058 */ 0059 explicit DRawInfo(); 0060 0061 /** 0062 * Standard destructor 0063 */ 0064 ~DRawInfo(); 0065 0066 public: 0067 0068 /** 0069 * True if RAW file include an ICC color profile. 0070 */ 0071 bool hasIccProfile; 0072 0073 /** 0074 * True is RAW file is decodable by dcraw. 0075 */ 0076 bool isDecodable; 0077 0078 /** 0079 * The number of RAW colors. 0080 */ 0081 int rawColors; 0082 0083 /** 0084 * The number of RAW images. 0085 */ 0086 int rawImages; 0087 0088 /** 0089 * Black level from Raw histogram. 0090 */ 0091 unsigned int blackPoint; 0092 0093 /** 0094 * Channel black levels from Raw histogram. 0095 */ 0096 unsigned int blackPointCh[4]; 0097 0098 /** 0099 * White level from Raw histogram. 0100 */ 0101 unsigned int whitePoint; 0102 0103 /** 0104 * Top margin of raw image. 0105 */ 0106 unsigned int topMargin; 0107 0108 /** 0109 * Left margin of raw image. 0110 */ 0111 unsigned int leftMargin; 0112 0113 /** 0114 * The raw image orientation 0115 */ 0116 ImageOrientation orientation; 0117 0118 /** 0119 * The sensitivity in ISO used by camera to take the picture. 0120 */ 0121 float sensitivity; 0122 0123 /** 0124 * 1/exposureTime = exposure time in seconds. 0125 */ 0126 float exposureTime; 0127 0128 /** 0129 * Aperture value in APEX. 0130 */ 0131 float aperture; 0132 0133 /** 0134 * Focal Length value in mm. 0135 */ 0136 float focalLength; 0137 0138 /** 0139 * The pixel Aspect Ratio if != 1.0. NOTE: if == 1.0, dcraw do not show this value. 0140 */ 0141 float pixelAspectRatio; 0142 0143 /** 0144 * Exposure compensation to be applied during raw conversion. 0145 */ 0146 float baselineExposure; 0147 0148 /** 0149 * Ambient temperature in Celsius degrees. 0150 */ 0151 float ambientTemperature; 0152 0153 /** 0154 * Ambient relative humidity in percent. 0155 */ 0156 float ambientHumidity; 0157 0158 /** 0159 * Ambient air pressure in hPa or mbar. 0160 */ 0161 float ambientPressure; 0162 0163 /** 0164 * Depth under water in metres, negative for above water. 0165 */ 0166 float ambientWaterDepth; 0167 0168 /** 0169 * Directionless camera acceleration in units of mGal, or 10-5 m/s2. 0170 */ 0171 float ambientAcceleration; 0172 0173 /** 0174 * Camera elevation angle in degrees. 0175 */ 0176 float ambientElevationAngle; 0177 0178 /** 0179 * Describe how flash has been used by camera. 0180 */ 0181 int flashUsed; 0182 0183 /** 0184 * The metering mode used by camera. 0185 */ 0186 int meteringMode; 0187 0188 /** 0189 * The exposure program used by camera. 0190 */ 0191 int exposureProgram; 0192 0193 /** 0194 * Exposure Index from the camera. 0195 */ 0196 float exposureIndex; 0197 0198 /** 0199 * White color balance settings. 0200 */ 0201 double daylightMult[3]; 0202 0203 /** 0204 * Camera multipliers used for White Balance adjustments 0205 */ 0206 double cameraMult[4]; 0207 0208 /** 0209 * Camera Color Matrix 0210 */ 0211 float cameraColorMatrix1[3][4]; 0212 float cameraColorMatrix2[3][4]; 0213 float cameraXYZMatrix[4][3]; 0214 0215 /** 0216 * GPS information 0217 */ 0218 double latitude; 0219 double longitude; 0220 double altitude; 0221 bool hasGpsInfo; ///< true if GPS info are parsed from RAW file. 0222 0223 /** 0224 * The used Color Keys 0225 */ 0226 QString colorKeys; 0227 0228 /** 0229 * The camera maker. 0230 */ 0231 QString make; 0232 0233 /** 0234 * The camera model. 0235 */ 0236 QString model; 0237 0238 /** 0239 * The artist name who have picture owner. 0240 */ 0241 QString owner; 0242 0243 /** 0244 * The software name which process raw image. 0245 */ 0246 QString software; 0247 0248 /** 0249 * The Firmware name or version which create raw image. 0250 */ 0251 QString firmware; 0252 0253 /** 0254 * The image description of raw image. 0255 */ 0256 QString description; 0257 0258 /** 0259 * Serial number of raw image. 0260 */ 0261 unsigned int serialNumber; 0262 0263 /** 0264 * The demosaising filter pattern. 0265 */ 0266 QString filterPattern; 0267 0268 /** 0269 * The DNG version. NOTE: it is only shown with DNG RAW files. 0270 */ 0271 QString DNGVersion; 0272 0273 /** 0274 * Non-localized name for the camera model that created the raw file 0275 */ 0276 QString uniqueCameraModel; 0277 0278 /** 0279 * Localized name for the camera model that created the raw file 0280 */ 0281 QString localizedCameraModel; 0282 0283 /** 0284 * An unique image ID generated by camera. 0285 */ 0286 QString imageID; 0287 0288 /** 0289 * An unique RAW data ID. 0290 */ 0291 QString rawDataUniqueID; 0292 0293 /** 0294 * The original RAW file name. 0295 */ 0296 QString originalRawFileName; 0297 0298 /** 0299 * Date & time when the picture has been taken. 0300 */ 0301 QDateTime dateTime; 0302 0303 /** 0304 * The image dimensions in pixels. 0305 */ 0306 QSize imageSize; 0307 0308 /** 0309 * The thumb dimensions in pixels. 0310 */ 0311 QSize thumbSize; 0312 0313 /** 0314 * The full RAW image dimensions in pixels. 0315 */ 0316 QSize fullSize; 0317 0318 /** 0319 * The output dimensions in pixels. 0320 */ 0321 QSize outputSize; 0322 0323 /** 0324 * Xmp metadata container extracted from RAW file, if present. 0325 */ 0326 QByteArray xmpData; 0327 0328 /** 0329 * ICC color profilr container extracted from RAW file, if present. 0330 */ 0331 QByteArray iccData; 0332 0333 /** 0334 * Thumbnail image data extracted from raw file. 0335 */ 0336 QByteArray thumbnail; 0337 0338 /** 0339 * Description of lens properties. 0340 */ 0341 QString lensModel; 0342 QString lensMake; 0343 QString lensSerial; 0344 int focalLengthIn35mmFilm; 0345 float maxAperture; 0346 }; 0347 0348 //! qDebug() stream operator. Writes container @a c to the debug output in a nicely formatted way. 0349 QDebug operator<<(QDebug dbg, const DRawInfo& c); 0350 0351 } // namespace Digikam 0352 0353 #endif // DIGIKAM_DRAW_INFO_H