IBitmap.h
Go to the documentation of this file.
1 #ifndef iimg_IBitmap_included
2 #define iimg_IBitmap_included
3 
4 
5 // ACF includes
6 #include <i2d/CRect.h>
7 #include <iimg/IRasterImage.h>
8 
9 
10 namespace iimg
11 {
12 
13 
17 class IBitmap: virtual public IRasterImage
18 {
19 public:
24  {
29 
34 
39 
44 
49 
54 
59 
64 
69 
74 
78  PF_USER = 256
79  };
80 
85  virtual PixelFormat GetPixelFormat() const = 0;
86 
91  virtual bool IsFormatSupported(PixelFormat pixelFormat) const = 0;
92 
100  virtual bool CreateBitmap(PixelFormat pixelFormat, const istd::CIndex2d& size, int pixelBitsCount = 0, int componentsCount = 0) = 0;
101 
110  virtual bool CreateBitmap(PixelFormat pixelFormat, const istd::CIndex2d& size, void* dataPtr, bool releaseFlag, int linesDifference = 0) = 0;
111 
115  virtual bool CreateImageFromRegion(const iimg::IBitmap& sourceImage, const i2d::CRect& region) = 0;
116 
120  virtual int GetLineBytesCount() const = 0;
121 
125  virtual int GetLinesDifference() const = 0;
126 
130  virtual int GetPixelsDifference() const = 0;
131 
135  virtual int GetComponentBitsCount(int componentIndex = 0) const = 0;
136 
140  virtual int GetPixelBitsCount() const = 0;
141 
146  virtual const void* GetLinePtr(int positionY) const = 0;
147 
152  virtual void* GetLinePtr(int positionY) = 0;
153 };
154 
155 
156 } // namespace iimg
157 
158 
159 #endif // !iimg_IBitmap_included
160 
161 
32-bit grayscale bitmap.
Definition: IBitmap.h:63
32-bit floating point coded bitmap (type float).
Definition: IBitmap.h:68
16-bit grayscale bitmap.
Definition: IBitmap.h:58
32-bit RGB bitmap with alpha channel.
Definition: IBitmap.h:48
virtual PixelFormat GetPixelFormat() const =0
Get the bitmap's pixel format.
Simple rectangle with integer bounds.
Definition: CRect.h:21
Index implementation for addressing elements in 2D-space.
Definition: CIndex2d.h:20
Unknown image format.
Definition: IBitmap.h:28
virtual int GetPixelBitsCount() const =0
Get total number of bits per single pixel.
virtual int GetLineBytesCount() const =0
Number of bytes per single line.
32-bit RGB-bitmap, alpha channel can be ignored.
Definition: IBitmap.h:43
Monochrome bitmap.
Definition: IBitmap.h:33
PixelFormat
Bitmap pixel format description.
Definition: IBitmap.h:23
virtual int GetComponentBitsCount(int componentIndex=0) const =0
Get number of bits per single pixel component.
virtual bool CreateBitmap(PixelFormat pixelFormat, const istd::CIndex2d &size, int pixelBitsCount=0, int componentsCount=0)=0
Create bitmap with specified size and format.
8-bit grayscale bitmap.
Definition: IBitmap.h:38
Definition of single plane bitmap.
Definition: IBitmap.h:17
64-bit floating point coded bitmap (type double).
Definition: IBitmap.h:73
General definition of image contains pixels in regular grid.
Definition: IRasterImage.h:19
24-bit RGB-bitmap packed bitmap.
Definition: IBitmap.h:53
virtual int GetPixelsDifference() const =0
Get address difference between next and previous pixel.
virtual int GetLinesDifference() const =0
Get address difference between next and previous line.
virtual const void * GetLinePtr(int positionY) const =0
Get pointer to buffer for single line.
virtual bool CreateImageFromRegion(const iimg::IBitmap &sourceImage, const i2d::CRect &region)=0
Create image as a copy of rectangular region of some other image.
First user defined pixel format.
Definition: IBitmap.h:78
virtual bool IsFormatSupported(PixelFormat pixelFormat) const =0
Get true if the pixel format is supported by the bitmap implementation.

© 2007-2017 Witold Gantzke and Kirill Lepskiy