libopenraw
|
generic IFD based raw file. More...
#include <ifdfile.hpp>
Protected Member Functions | |
IfdFile (const IO::Stream::Ptr &s, Type _type, bool instantiateContainer=true) | |
virtual ::or_error | _enumThumbnailSizes (std::vector< uint32_t > &list) override |
virtual ::or_error | _locateThumbnail (const IfdDir::Ref &dir, std::vector< uint32_t > &list) |
::or_error | _getRawDataFromDir (RawData &data, const IfdDir::Ref &dir) |
virtual uint32_t | _getJpegThumbnailOffset (const IfdDir::Ref &dir, uint32_t &len) |
virtual RawContainer * | getContainer () const override |
virtual IfdDir::Ref | _locateCfaIfd ()=0 |
virtual IfdDir::Ref | _locateMainIfd ()=0 |
virtual IfdDir::Ref | _locateExifIfd () |
virtual MakerNoteDir::Ref | _locateMakerNoteIfd () |
virtual void | _identifyId () override |
virtual MetaValue * | _getMetaValue (int32_t meta_index) override |
virtual uint32_t | _translateCompressionType (IFD::TiffCompress tiffCompression) |
virtual ::or_error | _unpackData (uint16_t bpc, uint32_t compression, RawData &data, uint32_t x, uint32_t y, uint32_t offset, uint32_t byte_length) |
const IfdDir::Ref & | cfaIfd () |
const IfdDir::Ref & | mainIfd () |
const IfdDir::Ref & | exifIfd () |
const MakerNoteDir::Ref & | makerNoteIfd () |
virtual ::or_error | _getRawData (RawData &data, uint32_t options) override |
virtual ::or_error | _decompressIfNeeded (RawData &, uint32_t) |
![]() | |
RawFile (Type _type) | |
void | _setTypeId (TypeId _type_id) |
TypeId | _typeId () const |
virtual ::or_error | _getThumbnail (uint32_t size, Thumbnail &thumbnail) |
void | _addThumbnail (uint32_t size, const Internals::ThumbDesc &desc) |
virtual ::or_error | _getColourMatrix (uint32_t index, double *matrix, uint32_t &size) |
virtual ExifLightsourceValue | _getCalibrationIlluminant (uint16_t index) |
TypeId | _typeIdFromModel (const std::string &make, const std::string &model) |
TypeId | _typeIdFromMake (const std::string &make) |
void | _setIdMap (const camera_ids_t *map) |
void | _setMatrices (const Internals::BuiltinColourMatrix *matrices) |
const Internals::BuiltinColourMatrix * | _getMatrices () const |
Protected Attributes | |
IO::Stream::Ptr | m_io |
IfdFileContainer * | m_container |
Additional Inherited Members | |
![]() | |
typedef ::or_rawfile_type | Type |
typedef ::or_rawfile_typeid | TypeId |
![]() | |
RawFile (const RawFile &)=delete | |
RawFile & | operator= (const RawFile &)=delete |
virtual | ~RawFile () |
Type | type () const |
TypeId | typeId () |
const std::vector< uint32_t > & | listThumbnailSizes (void) |
::or_error | getThumbnail (uint32_t size, Thumbnail &thumbnail) |
::or_error | getRawData (RawData &rawdata, uint32_t options) |
::or_error | getRenderedImage (BitmapData &bitmapdata, uint32_t options) |
int32_t | getOrientation () |
uint32_t | colourMatrixSize () |
::or_error | getColourMatrix1 (double *matrix, uint32_t &size) |
::or_error | getColourMatrix2 (double *matrix, uint32_t &size) |
ExifLightsourceValue | getCalibrationIlluminant1 () |
ExifLightsourceValue | getCalibrationIlluminant2 () |
const MetaValue * | getMetaValue (int32_t meta_index) |
![]() | |
static const char ** | fileExtensions () |
static RawFile * | newRawFile (const char *_filename, Type _typeHint=OR_RAWFILE_TYPE_UNKNOWN) |
static RawFile * | newRawFileFromMemory (const uint8_t *buffer, uint32_t len, Type _typeHint=OR_RAWFILE_TYPE_UNKNOWN) |
![]() | |
::or_error | _getBuiltinLevels (const Internals::BuiltinColourMatrix *m, TypeId type_id, uint16_t &black, uint16_t &white) |
::or_error | _getBuiltinColourMatrix (const Internals::BuiltinColourMatrix *m, TypeId type_id, double *matrix, uint32_t &size) |
generic IFD based raw file.
Definition at line 48 of file ifdfile.hpp.
|
overrideprotectedvirtual |
list the thumbnails in the IFD
list | the list of thumbnails |
Implements OpenRaw::RawFile.
Reimplemented in OpenRaw::Internals::MRWFile, and OpenRaw::Internals::OrfFile.
Definition at line 113 of file ifdfile.cpp.
|
protectedvirtual |
Get the JPEG thumbnail offset from dir.
dir | the IFD to get the thumbnail from |
len | the length of the JPEG stream. 0 is not valid. |
Definition at line 285 of file ifdfile.cpp.
|
overrideprotectedvirtual |
get the RAW data
data | the RAW data |
option | the option bits |
Implements OpenRaw::RawFile.
Reimplemented in OpenRaw::Internals::MRWFile, OpenRaw::Internals::OrfFile, and OpenRaw::Internals::PEFFile.
Definition at line 486 of file ifdfile.cpp.
|
protected |
load the compressed rawdata from a standard location in an IFD
data | the data storage |
dir | the IFD |
Definition at line 511 of file ifdfile.cpp.
References OpenRaw::Internals::NefFile::isCompressed(), OpenRaw::BitmapData::setBpc(), OpenRaw::BitmapData::setDataType(), and OpenRaw::RawData::setDimensions().
Referenced by OpenRaw::Internals::ERFFile::_getRawData().
|
protected |
locate the thumnail in the IFD
dir | the IfdDir where to locate the thumbnail |
Definition at line 149 of file ifdfile.cpp.
|
protectedvirtual |
Translate the compression type from the tiff type (16MSB) to the RAW specific type if needed (16MSB)
tiffCompression | the 16 bits value from TIFF |
by default we don't translate the compression
Reimplemented in OpenRaw::Internals::OrfFile.
Definition at line 326 of file ifdfile.cpp.
|
protected |
Unpack the data
bpc | bits per components |
compression | the compression type |
x | the width |
y | the height |
offset | the offset of the data |
byte_length | the amount of data |
Definition at line 675 of file ifdfile.cpp.
References OpenRaw::Internals::Unpack::unpack_be12to16().
|
protected |
access the corresponding IFD. Will locate them if needed
Definition at line 333 of file ifdfile.cpp.
References OpenRaw::Internals::IfdTypeTrait< T >::get().
Referenced by OpenRaw::Internals::ERFFile::_getRawData().
|
overrideprotectedvirtual |
|
protected |
the real container
Definition at line 90 of file ifdfile.hpp.
|
protected |
the IO handle
Definition at line 89 of file ifdfile.hpp.