28 #include <libopenraw/consts.h>
29 #include <libopenraw/types.h>
32 #include "rawdata.hpp"
33 #include "mosaicinfo.hpp"
45 #define CHECK_PTR(p, r) \
57 *pRawData = RawData::getAndExtractRawData(filename, options, ret);
71 if (rawdata == NULL) {
74 delete reinterpret_cast<RawData *
>(rawdata);
81 return reinterpret_cast<RawData *
>(rawdata)->dataType();
87 return reinterpret_cast<RawData *
>(rawdata)->data();
93 return reinterpret_cast<RawData *
>(rawdata)->size();
104 if (height != NULL) {
111 uint32_t *width, uint32_t *height)
118 *y = t->activeAreaY();
121 *width = t->activeAreaWidth();
123 if (height != NULL) {
124 *height = t->activeAreaHeight();
132 return reinterpret_cast<RawData *
>(rawdata)->bpc();
138 return reinterpret_cast<RawData *
>(rawdata)->mosaicInfo()->patternType();
150 return reinterpret_cast<RawData *
>(rawdata)->compression();
159 *black = t->blackLevel();
162 *white = t->whiteLevel();
171 uint32_t matrix_size = 0;
173 const double *matrix =
nullptr;
207 *
reinterpret_cast<BitmapData *
>(bitmapdata), options);
Represent some bitmap data.
uint32_t width() const
Width of the image data.
uint32_t height() const
Height of the image data.
Represent camera raw data.
const double * getColourMatrix1(uint32_t &size) const
uint32_t activeAreaX() const
::or_error getRenderedImage(BitmapData &bitmapdata, uint32_t options)
const double * getColourMatrix2(uint32_t &size) const
const struct _MosaicInfo * ORMosaicInfoRef
A MosaicInfo object.
struct _RawData * ORRawDataRef
RawData reference.
or_cfa_pattern
CFA pattern types.
or_error
Error codes returned by libopenraw.
struct _BitmapData * ORBitmapDataRef
BitmapData reference.
API_EXPORT void or_rawdata_dimensions(ORRawDataRef rawdata, uint32_t *width, uint32_t *height)
Get the RAW data dimensions in pixels.
API_EXPORT ORRawDataRef or_rawdata_new(void)
Allocate a new RawData.
API_EXPORT const double * or_rawdata_get_colour_matrix(ORRawDataRef rawdata, uint32_t index, uint32_t *size)
Get the colour matrix.
API_EXPORT or_error or_rawdata_get_rendered_image(ORRawDataRef rawdata, ORBitmapDataRef bitmapdata, uint32_t options)
Get the rendered image from the raw data.
API_EXPORT or_error or_rawdata_get_levels(ORRawDataRef rawdata, uint16_t *black, uint16_t *white)
Return the levels values for the raw data.
API_EXPORT uint32_t or_rawdata_bpc(ORRawDataRef rawdata)
Return the bits per component.
API_EXPORT or_error or_rawdata_get_active_area(ORRawDataRef rawdata, uint32_t *x, uint32_t *y, uint32_t *width, uint32_t *height)
Get the active area for the raw data.
API_EXPORT size_t or_rawdata_data_size(ORRawDataRef rawdata)
Get the size of the RAW data in bytes.
API_EXPORT uint32_t or_rawdata_get_compression(ORRawDataRef rawdata)
Return the compression type for the RawData.
API_EXPORT ORMosaicInfoRef or_rawdata_get_mosaicinfo(ORRawDataRef rawdata)
Return the mosaic info.
API_EXPORT or_cfa_pattern or_rawdata_get_cfa_pattern_type(ORRawDataRef rawdata)
Return the bayer type for the raw data.
API_EXPORT or_data_type or_rawdata_format(ORRawDataRef rawdata)
Get the format of the RAW data.
API_EXPORT or_error or_get_extract_rawdata(const char *filename, uint32_t options, ORRawDataRef *rawdata)
Extract the RAW data from the raw file.
API_EXPORT void * or_rawdata_data(ORRawDataRef rawdata)
Get a pointer to the RAW data.
API_EXPORT or_error or_rawdata_release(ORRawDataRef rawdata)
Release the rawdata.
Global namespace for libopenraw.