26 #include <libopenraw/consts.h>
27 #include <libopenraw/debug.h>
30 #include "bitmapdata.hpp"
32 using namespace Debug;
54 , data_type(OR_DATA_TYPE_NONE)
68 Private(
const Private &) =
delete;
69 Private &operator=(
const Private &) =
delete;
72 BitmapData::BitmapData() : d(new BitmapData::Private())
76 BitmapData::~BitmapData()
83 std::swap(this->d, with.d);
96 case OR_DATA_TYPE_NONE:
111 void *BitmapData::allocData(
const size_t s)
113 LOGDBG1(
"allocate s=%lu data =%p\n", (LSIZE)s, d->
data);
114 d->
data = calloc(s, 1);
115 LOGDBG1(
" data =%p\n", d->
data);
127 if (size < d->data_size) {
132 void *BitmapData::data()
const
Represent some bitmap data.
void setDataType(DataType _type)
Set the data type.
uint32_t width() const
Width of the image data.
uint32_t height() const
Height of the image data.
void swap(BitmapData &with)
Swap the two objects data.
void setBpc(uint32_t _bpc)
Set bit per channel.
size_t size() const
Get the size of the data.
virtual void setDimensions(uint32_t x, uint32_t y)
Set the pixel dimensions of the bitmap.
DataType dataType() const
Get the data type.
uint32_t bpc() const
Bit per channel.
void adjustSize(size_t size)
@ OR_DATA_TYPE_COMPRESSED_RAW
@ OR_DATA_TYPE_PIXMAP_8RGB
Global namespace for libopenraw.