27 #include <libopenraw/rawfile.h>
30 #include "makernotedir.hpp"
49 class MetadataIterator;
56 typedef std::map<uint32_t, ::or_rawfile_typeid>
ModelIdMap;
59 void audit_coefficients();
68 friend void Internals::audit_coefficients();
158 ::or_error getColourMatrix2(
double* matrix, uint32_t& size);
164 ExifLightsourceValue getCalibrationIlluminant2();
221 const uint32_t type_id;
232 static RawFile::TypeId
modelid_to_typeid(
const std::map<uint32_t, RawFile::TypeId>& model_map,
280 virtual ExifLightsourceValue _getCalibrationIlluminant(uint16_t index);
284 TypeId _typeIdFromModel(
const std::string& make,
const std::string & model);
285 TypeId _typeIdFromMake(
const std::string& make,
const std::string& model);
303 static Type identify(
const char*_filename);
310 const std::string& value);
312 const std::string& value);
Represent some bitmap data.
std::shared_ptr< Stream > Ptr
std::shared_ptr< IfdDir > Ref
Shared ptr of an IfdDir.
Generic interface for the RAW file container.
Represent camera raw data.
virtual ::or_error _getRawData(RawData &data, uint32_t options)=0
Get the RAW data.
virtual ::or_error _getThumbnail(uint32_t size, Thumbnail &thumbnail)
Get the thumbnail of exact size.
virtual Internals::MakerNoteDir::Ref _locateMakerNoteIfd()
Locate the MakerNote IFD.
::or_error getThumbnail(uint32_t size, Thumbnail &thumbnail)
Get the thumbnail from the raw file.
virtual Internals::IfdDir::Ref _locateCfaIfd()=0
Locate the IFD for the raw data.
TypeId typeId()
The RAW file type ID. Identify it if needed.
virtual bool vendorCameraIdLocation(Internals::IfdDir::Ref &ifd, uint16_t &index, const Internals::ModelIdMap *&model_map)
Get the vendor camera ID location.
void _setTypeId(TypeId _type_id)
Set the file type id.
Internals::IfdDir::Ref exifIfd()
Get the Exif IFD.
virtual Internals::IfdDir::Ref _locateExifIfd()
Locate the Exif IFD.
::or_error getRawData(RawData &rawdata, uint32_t options)
Get the RAW data.
uint32_t colourMatrixSize()
virtual ::or_error _getColourMatrix(uint32_t index, double *matrix, uint32_t &size)
Get the colour matrix.
static RawFile * newRawFile(const char *_filename, Type typeHint=OR_RAWFILE_TYPE_UNKNOWN)
Factory method to create the proper RawFile instance.
virtual Internals::IfdDir::Ref _locateMainIfd()=0
Locate the main IFD.
virtual ::or_error _enumThumbnailSizes(std::vector< uint32_t > &list)=0
Enumerate the thumbnail sizes.
uint32_t getOrientation()
Get the orientation of the image, using Exif enums.
Internals::MakerNoteDir::Ref makerNoteIfd()
Get the MakerNote IFD.
::or_error getColourMatrix1(double *matrix, uint32_t &size)
Get colour matrix.
virtual Internals::RawContainer * getContainer() const =0
Get the container.
static RawFile * newRawFileFromMemory(const uint8_t *buffer, uint32_t len, Type typeHint=OR_RAWFILE_TYPE_UNKNOWN)
Factory method to create the proper RawFile instance from content.
virtual ~RawFile()
Destructor.
virtual MetaValue * _getMetaValue(int32_t)=0
Implementation for getMetaValue()
virtual void _identifyId()=0
Identify the file and set the ID internally.
const std::vector< uint32_t > & listThumbnailSizes(void)
List the available thumbnail sizes.
::or_error getRenderedImage(BitmapData &bitmapdata, uint32_t options)
Get the rendered image.
Internals::IfdDir::Ref mainIfd()
Get the main IFD.
ExifLightsourceValue getCalibrationIlluminant1()
Get the calibration illuminant that match the colour matrix.
Internals::IfdDir::Ref cfaIfd()
Get the IFD containing the CFA.
static const char ** fileExtensions()
Return a NULL terminated list of file extensions that the library handle.
TypeId _typeId() const
Just get the type id value. No identification. You might want to use typeId() in the general case.
const MetaValue * getMetaValue(int32_t meta_index)
Get a metadata value.
static RawFile::TypeId modelid_to_typeid(const std::map< uint32_t, RawFile::TypeId > &model_map, uint32_t model_id)
Helper to get the TypeId from the map.
virtual or_colour_matrix_origin getColourMatrixOrigin() const
Get the origin of the colour matrix for the RAW file.
Type type() const
Accessor for the type.
uint32_t or_rawfile_typeid
This is the type ID, a combination of vendor model It maps a specific camera. Only for the NATIVE fil...
or_rawfile_type
Types of RAW files.
or_colour_matrix_origin
Where the colour matrix comes from. Typically DNG is provided. The others are built-in.
or_error
Error codes returned by libopenraw.
@ OR_RAWFILE_TYPE_UNKNOWN
std::map< uint32_t, ::or_rawfile_typeid > ModelIdMap
Global namespace for libopenraw.