26#include <boost/checked_delete.hpp>
28#include <libopenraw/consts.h>
29#include <libopenraw/thumbnails.h>
30#include <libopenraw/types.h>
48#define CHECK_PTR(p, r) \
53const char **or_get_file_extensions()
58ORRawFileRef or_rawfile_new(
const char *filename, or_rawfile_type type)
60 CHECK_PTR(filename, NULL);
62 return reinterpret_cast<ORRawFileRef
>(rawfile);
65ORRawFileRef or_rawfile_new_from_memory(
const uint8_t *buffer, uint32_t len,
68 CHECK_PTR(buffer, NULL);
70 return reinterpret_cast<ORRawFileRef
>(rawfile);
73or_error or_rawfile_release(ORRawFileRef rawfile)
75 CHECK_PTR(rawfile, OR_ERROR_NOTAREF);
76 boost::checked_delete(
reinterpret_cast<RawFile *
>(rawfile));
80or_rawfile_type or_rawfile_get_type(ORRawFileRef rawfile)
82 CHECK_PTR(rawfile, OR_RAWFILE_TYPE_UNKNOWN);
84 return prawfile->
type();
87or_rawfile_typeid or_rawfile_get_typeid(ORRawFileRef rawfile)
89 CHECK_PTR(rawfile, OR_RAWFILE_TYPE_UNKNOWN);
95or_rawfile_get_thumbnail_sizes(ORRawFileRef rawfile,
98 CHECK_PTR(rawfile,
nullptr);
99 CHECK_PTR(
size,
nullptr);
109 return &(*v.begin());
112or_error or_rawfile_get_thumbnail(ORRawFileRef rawfile,
113 uint32_t _preferred_size,
114 ORThumbnailRef thumb)
116 CHECK_PTR(rawfile, OR_ERROR_NOTAREF);
122or_error or_rawfile_get_rawdata(ORRawFileRef rawfile, ORRawDataRef rawdata,
126 CHECK_PTR(rawfile, OR_ERROR_NOTAREF);
130or_error or_rawfile_get_rendered_image(ORRawFileRef rawfile,
131 ORBitmapDataRef bitmapdata,
135 CHECK_PTR(rawfile, OR_ERROR_NOTAREF);
137 *
reinterpret_cast<BitmapData *
>(bitmapdata), options);
140int32_t or_rawfile_get_orientation(ORRawFileRef rawfile)
143 CHECK_PTR(rawfile, 0);
147or_error or_rawfile_get_colourmatrix1(ORRawFileRef rawfile,
double *matrix,
151 CHECK_PTR(rawfile, OR_ERROR_NOTAREF);
152 CHECK_PTR(
size, OR_ERROR_INVALID_PARAM);
156or_error or_rawfile_get_colourmatrix2(ORRawFileRef rawfile,
double *matrix,
160 CHECK_PTR(rawfile, OR_ERROR_NOTAREF);
161 CHECK_PTR(
size, OR_ERROR_INVALID_PARAM);
162 return prawfile->getColourMatrix2(matrix, *
size);
165ExifLightsourceValue or_rawfile_get_calibration_illuminant1(ORRawFileRef rawfile)
168 CHECK_PTR(rawfile, (ExifLightsourceValue)0);
172ExifLightsourceValue or_rawfile_get_calibration_illuminant2(ORRawFileRef rawfile)
175 CHECK_PTR(rawfile, (ExifLightsourceValue)0);
176 return prawfile->getCalibrationIlluminant2();
180or_rawfile_get_metavalue(ORRawFileRef rawfile, int32_t meta_index)
183 CHECK_PTR(rawfile,
nullptr);
184 return reinterpret_cast<ORConstMetaValueRef
>(prawfile->getMetaValue(meta_index));
::or_error getThumbnail(uint32_t size, Thumbnail &thumbnail)
::or_error getRawData(RawData &rawdata, uint32_t options)
::or_error getColourMatrix1(double *matrix, uint32_t &size)
const std::vector< uint32_t > & listThumbnailSizes(void)
::or_error getRenderedImage(BitmapData &bitmapdata, uint32_t options)
ExifLightsourceValue getCalibrationIlluminant1()
static RawFile * newRawFile(const char *_filename, Type _typeHint=OR_RAWFILE_TYPE_UNKNOWN)
static const char ** fileExtensions()
static RawFile * newRawFileFromMemory(const uint8_t *buffer, uint32_t len, Type _typeHint=OR_RAWFILE_TYPE_UNKNOWN)
CIFF is the container for CRW files. It is an attempt from Canon to make this a standard....