26 #include <sys/types.h>
31 #include "io/stream.hpp"
33 #include "rawcontainer.hpp"
35 #include "ifdfilecontainer.hpp"
44 const int DataBlockHeaderLength = 8;
51 typedef std::shared_ptr<DataBlock>
Ref;
61 off_t
offset()
const {
return m_start; }
65 off_t
length()
const {
return m_length; }
75 return std::string(
id);
91 bool loaded()
const {
return m_loaded; }
108 PRD_SENSOR_LENGTH = 8,
109 PRD_SENSOR_WIDTH = 10,
110 PRD_IMAGE_LENGTH = 12,
111 PRD_IMAGE_WIDTH = 14,
114 PRD_STORAGE_TYPE = 18,
117 PRD_BAYER_PATTERN = 22
121 STORAGE_TYPE_UNPACKED = 0x52,
122 STORAGE_TYPE_PACKED = 0x59
126 BAYER_PATTERN_RGGB = 0x0001,
127 BAYER_PATTERN_GBRG = 0x0004
133 WBG_DENOMINATOR_R = 0,
134 WBG_DENOMINATOR_G1 = 1,
135 WBG_DENOMINATOR_G2 = 2,
136 WBG_DENOMINATOR_B = 3,
138 WBG_NOMINATOR_G1 = 6,
139 WBG_NOMINATOR_G2 = 8,
151 RIF_WHITE_BALANCE = 4,
152 RIF_SUBJECT_PROGRAM = 5,
155 RIF_COLOR_FILTER = 56,
161 WHITE_BALANCE_AUTO = 0,
162 WHITE_BALANCE_DAYLIGHT = 1,
163 WHITE_BALANCE_CLOUDY = 2,
164 WHITE_BALANCE_TUNGSTEN = 3,
165 WHITE_BALANCE_FLUORESCENT = 4
169 SUBJECT_PROGRAM_NONE = 0,
170 SUBJECT_PROGRAM_PORTRAIT = 1,
171 SUBJECT_PROGRAM_TEXT = 2,
172 SUBJECT_PROGRAM_NIGHT_PORTRAIT = 3,
173 SUBJECT_PROGRAM_SUNSET = 4,
174 SUBJECT_PROGRAM_SPORTS_ACTION = 5
178 COLOR_MODE_NORMAL = 0,
179 COLOR_MODE_BLACK_AND_WHITE = 1,
180 COLOR_MODE_VIVID_COLOR = 2,
181 COLOR_MODE_SOLARIZATION = 3,
182 COLOR_MODE_ADOBE_RGB = 4
188 IFDTAG_WIDTH = 0x0100,
189 IFDTAG_HEIGHT = 0x0101,
190 IFDTAG_COMPRESS = 0x0103,
191 IFDTAG_DCFVER = 0x010E,
192 IFDTAG_MANUF = 0x010F,
193 IFDTAG_CAMERA = 0x0110,
194 IFDTAG_FIRMWARE = 0x0131,
195 IFDTAG_DATETIME = 0x0132,
196 IFDTAG_EXIFOFFSET = 0x8769,
197 IFDTAG_PIMOFFSET = 0xC4A5
204 MRWTAG_THUMBNAIL_OFFSET = 0x0088,
205 MRWTAG_THUMBNAIL_LENGTH = 0x0089
235 return mrm->offset() + MRW::DataBlockHeaderLength + mrm->length();
242 std::string m_version;
std::shared_ptr< Stream > Ptr
off_t pixelDataOffset() const
virtual bool locateDirsPreHook() override
hook to be called at the start of _locateDirs()
virtual IfdFileContainer::EndianType isMagicHeader(const char *p, int len) override
Represents an MRW Data Block.
Option< uint16_t > uint16_val(off_t offset) const
std::shared_ptr< DataBlock > Ref
Option< std::string > string_val(off_t offset) const
DataBlock(off_t start, MRWContainer *container)
Option< uint8_t > uint8_val(off_t offset) const
EndianType
Define the endian of the container.
An option type inspired by Rust.
Global namespace for libopenraw.