libopenraw  0.3.7
bitmapdata.hpp
1 /*
2  * libopenraw - bitmapdata.h
3  *
4  * Copyright (C) 2007-2020 Hubert Figuière
5  *
6  * This library is free software: you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public License
8  * as published by the Free Software Foundation, either version 3 of
9  * the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library. If not, see
18  * <http://www.gnu.org/licenses/>.
19  */
20 
21 #pragma once
22 
23 #include <libopenraw/prefix.h>
24 #include <libopenraw/rawdata.h>
25 
26 namespace OpenRaw {
27 
30 {
31 public:
33 
34  BitmapData();
35  virtual ~BitmapData();
36 
38  void swap(BitmapData & with);
39 
41  DataType dataType() const;
43  void setDataType(DataType _type);
44 
45  virtual void *allocData(const size_t s);
47  size_t size() const;
48  void *data() const;
49 
51  uint32_t width() const;
53  uint32_t height() const;
55  uint32_t bpc() const;
57  void setBpc(uint32_t _bpc);
58 
60  virtual void setDimensions(uint32_t x, uint32_t y);
61 
65  void adjustSize(size_t size);
66 private:
67  class Private;
69 
71  BitmapData(const BitmapData& f);
73  BitmapData & operator=(const BitmapData&);
74 };
75 
76 }
Represent some bitmap data.
Definition: bitmapdata.hpp:30
void setDataType(DataType _type)
Set the data type.
Definition: bitmapdata.cpp:91
uint32_t width() const
Width of the image data.
Definition: bitmapdata.cpp:137
uint32_t height() const
Height of the image data.
Definition: bitmapdata.cpp:142
void swap(BitmapData &with)
Swap the two objects data.
Definition: bitmapdata.cpp:81
void setBpc(uint32_t _bpc)
Set bit per channel.
Definition: bitmapdata.cpp:152
size_t size() const
Get the size of the data.
Definition: bitmapdata.cpp:120
virtual void setDimensions(uint32_t x, uint32_t y)
Set the pixel dimensions of the bitmap.
Definition: bitmapdata.cpp:157
DataType dataType() const
Get the data type.
Definition: bitmapdata.cpp:86
uint32_t bpc() const
Bit per channel.
Definition: bitmapdata.cpp:147
void adjustSize(size_t size)
Definition: bitmapdata.cpp:125
or_data_type
Data types.
Definition: consts.h:80
Global namespace for libopenraw.
Definition: arwfile.cpp:29