File indexing completed on 2025-01-19 03:55:16
0001 /*****************************************************************************/ 0002 // Copyright 2006-2019 Adobe Systems Incorporated 0003 // All Rights Reserved. 0004 // 0005 // NOTICE: Adobe permits you to use, modify, and distribute this file in 0006 // accordance with the terms of the Adobe license agreement accompanying it. 0007 /*****************************************************************************/ 0008 0009 #ifndef __dng_shared__ 0010 #define __dng_shared__ 0011 0012 /*****************************************************************************/ 0013 0014 #include "dng_classes.h" 0015 #include "dng_fingerprint.h" 0016 #include "dng_matrix.h" 0017 #include "dng_memory.h" 0018 #include "dng_negative.h" 0019 #include "dng_rational.h" 0020 #include "dng_string.h" 0021 #include "dng_stream.h" 0022 #include "dng_sdk_limits.h" 0023 #include "dng_types.h" 0024 #include "dng_xy_coord.h" 0025 0026 /*****************************************************************************/ 0027 0028 class dng_camera_profile_info 0029 { 0030 0031 public: 0032 0033 bool fBigEndian; 0034 0035 uint32 fColorPlanes; 0036 0037 uint32 fCalibrationIlluminant1; 0038 uint32 fCalibrationIlluminant2; 0039 0040 dng_matrix fColorMatrix1; 0041 dng_matrix fColorMatrix2; 0042 0043 dng_matrix fForwardMatrix1; 0044 dng_matrix fForwardMatrix2; 0045 0046 dng_matrix fReductionMatrix1; 0047 dng_matrix fReductionMatrix2; 0048 0049 dng_string fProfileCalibrationSignature; 0050 0051 dng_string fProfileName; 0052 0053 dng_string fProfileCopyright; 0054 0055 uint32 fEmbedPolicy; 0056 0057 uint32 fProfileHues; 0058 uint32 fProfileSats; 0059 uint32 fProfileVals; 0060 0061 uint64 fHueSatDeltas1Offset; 0062 uint32 fHueSatDeltas1Count; 0063 0064 uint64 fHueSatDeltas2Offset; 0065 uint32 fHueSatDeltas2Count; 0066 0067 uint32 fHueSatMapEncoding; 0068 0069 uint32 fLookTableHues; 0070 uint32 fLookTableSats; 0071 uint32 fLookTableVals; 0072 0073 uint64 fLookTableOffset; 0074 uint32 fLookTableCount; 0075 0076 uint32 fLookTableEncoding; 0077 0078 dng_srational fBaselineExposureOffset; 0079 0080 uint32 fDefaultBlackRender; 0081 0082 uint64 fToneCurveOffset; 0083 uint32 fToneCurveCount; 0084 0085 dng_string fUniqueCameraModel; 0086 0087 public: 0088 0089 dng_camera_profile_info (); 0090 0091 ~dng_camera_profile_info (); 0092 0093 bool ParseTag (dng_stream &stream, 0094 uint32 parentCode, 0095 uint32 tagCode, 0096 uint32 tagType, 0097 uint32 tagCount, 0098 uint64 tagOffset); 0099 0100 bool ParseExtended (dng_stream &stream); 0101 0102 }; 0103 0104 /*****************************************************************************/ 0105 0106 class dng_shared 0107 { 0108 0109 public: 0110 0111 uint64 fExifIFD; 0112 uint64 fGPSInfo; 0113 uint64 fInteroperabilityIFD; 0114 uint64 fKodakDCRPrivateIFD; 0115 uint64 fKodakKDCPrivateIFD; 0116 0117 uint32 fXMPCount; 0118 uint64 fXMPOffset; 0119 0120 uint32 fIPTC_NAA_Count; 0121 uint64 fIPTC_NAA_Offset; 0122 0123 uint32 fMakerNoteCount; 0124 uint64 fMakerNoteOffset; 0125 uint32 fMakerNoteSafety; 0126 0127 uint32 fDNGVersion; 0128 uint32 fDNGBackwardVersion; 0129 0130 dng_string fUniqueCameraModel; 0131 dng_string fLocalizedCameraModel; 0132 0133 dng_camera_profile_info fCameraProfile; 0134 0135 dng_std_vector<dng_camera_profile_info> fExtraCameraProfiles; 0136 0137 dng_matrix fCameraCalibration1; 0138 dng_matrix fCameraCalibration2; 0139 0140 dng_string fCameraCalibrationSignature; 0141 0142 dng_vector fAnalogBalance; 0143 0144 dng_vector fAsShotNeutral; 0145 0146 dng_xy_coord fAsShotWhiteXY; 0147 0148 dng_srational fBaselineExposure; 0149 dng_urational fBaselineNoise; 0150 dng_urational fBaselineSharpness; 0151 dng_urational fLinearResponseLimit; 0152 dng_urational fShadowScale; 0153 0154 bool fHasBaselineExposure; 0155 bool fHasShadowScale; 0156 0157 uint32 fDNGPrivateDataCount; 0158 uint64 fDNGPrivateDataOffset; 0159 0160 dng_fingerprint fRawImageDigest; 0161 dng_fingerprint fNewRawImageDigest; 0162 0163 dng_fingerprint fRawDataUniqueID; 0164 0165 dng_string fOriginalRawFileName; 0166 0167 uint32 fOriginalRawFileDataCount; 0168 uint64 fOriginalRawFileDataOffset; 0169 0170 dng_fingerprint fOriginalRawFileDigest; 0171 0172 uint32 fAsShotICCProfileCount; 0173 uint64 fAsShotICCProfileOffset; 0174 0175 dng_matrix fAsShotPreProfileMatrix; 0176 0177 uint32 fCurrentICCProfileCount; 0178 uint64 fCurrentICCProfileOffset; 0179 0180 dng_matrix fCurrentPreProfileMatrix; 0181 0182 uint32 fColorimetricReference; 0183 0184 dng_string fAsShotProfileName; 0185 0186 dng_point fOriginalDefaultFinalSize; 0187 dng_point fOriginalBestQualityFinalSize; 0188 0189 dng_urational fOriginalDefaultCropSizeH; 0190 dng_urational fOriginalDefaultCropSizeV; 0191 0192 uint32 fDepthFormat; 0193 dng_urational fDepthNear; 0194 dng_urational fDepthFar; 0195 uint32 fDepthUnits; 0196 uint32 fDepthMeasureType; 0197 0198 public: 0199 0200 dng_shared (); 0201 0202 virtual ~dng_shared (); 0203 0204 virtual bool ParseTag (dng_stream &stream, 0205 dng_exif &exif, 0206 uint32 parentCode, 0207 bool isMainIFD, 0208 uint32 tagCode, 0209 uint32 tagType, 0210 uint32 tagCount, 0211 uint64 tagOffset, 0212 int64 offsetDelta); 0213 0214 virtual void PostParse (dng_host &host, 0215 dng_exif &exif); 0216 0217 virtual bool IsValidDNG (); 0218 0219 protected: 0220 0221 virtual bool Parse_ifd0 (dng_stream &stream, 0222 dng_exif &exif, 0223 uint32 parentCode, 0224 uint32 tagCode, 0225 uint32 tagType, 0226 uint32 tagCount, 0227 uint64 tagOffset); 0228 0229 virtual bool Parse_ifd0_exif (dng_stream &stream, 0230 dng_exif &exif, 0231 uint32 parentCode, 0232 uint32 tagCode, 0233 uint32 tagType, 0234 uint32 tagCount, 0235 uint64 tagOffset); 0236 0237 }; 0238 0239 /*****************************************************************************/ 0240 0241 #endif 0242 0243 /*****************************************************************************/