ICF 3.0.5.47
Technical documentation of ICF Libraries
IBitmap.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#ifndef iimg_IBitmap_included
7#define iimg_IBitmap_included
8
9
10// ICF includes
11#include <istd/COptMemory.h>
12#include <i2d/CRect.h>
13#include <iimg/IRasterImage.h>
14
15
16namespace iimg
17{
18
19
23class IBitmap: virtual public IRasterImage
24{
25public:
98
103 virtual PixelFormat GetPixelFormat() const = 0;
104
109 virtual bool IsFormatSupported(PixelFormat pixelFormat) const = 0;
110
118 virtual bool CreateBitmap(PixelFormat pixelFormat, const istd::CIndex2d& size, int pixelBitsCount = 0, int componentsCount = 0) = 0;
119
127 virtual bool CreateBitmap(PixelFormat pixelFormat, const istd::CIndex2d& size, istd::COptMemory&& data, int linesDifference = 0) = 0;
128
132 virtual int GetLineBytesCount() const = 0;
133
138 virtual int GetLinesDifference() const = 0;
139
143 virtual int GetPixelsDifference() const = 0;
144
148 virtual int GetComponentBitsCount(int componentIndex = 0) const = 0;
149
153 virtual int GetPixelBitsCount() const = 0;
154
159 virtual const void* GetLinePtr(int positionY) const = 0;
160
165 virtual void* GetLinePtr(int positionY) = 0;
166};
167
168
169} // namespace iimg
170
171
172#endif // !iimg_IBitmap_included
173
174
Definition of single plane bitmap.
Definition IBitmap.h:24
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, istd::COptMemory &&data, int linesDifference=0)=0
Create bitmap with specified size and format using external image data buffer.
PixelFormat
Bitmap pixel format description.
Definition IBitmap.h:30
@ PF_GRAY32
32-bit grayscale bitmap.
Definition IBitmap.h:69
@ PF_XY32
Pixel value is a 32-bit floating 2D-coordinate (X,Y) In this mode the bitmap represents 2D calibratio...
Definition IBitmap.h:91
@ PF_USER
First user defined pixel format.
Definition IBitmap.h:96
@ PF_RGB24
24-bit RGB-bitmap packed bitmap.
Definition IBitmap.h:59
@ PF_XYZ32
Pixel value is a 32-bit floating 3D-coordinate (X,Y,Z) In this mode the bitmap represents an organize...
Definition IBitmap.h:85
@ PF_RGBA
32-bit RGB bitmap with alpha channel.
Definition IBitmap.h:54
@ PF_FLOAT32
32-bit floating point coded bitmap (type float).
Definition IBitmap.h:74
@ PF_FLOAT64
64-bit floating point coded bitmap (type double).
Definition IBitmap.h:79
@ PF_GRAY16
16-bit grayscale bitmap.
Definition IBitmap.h:64
@ PF_GRAY
8-bit grayscale bitmap.
Definition IBitmap.h:44
@ PF_UNKNOWN
Unknown image format.
Definition IBitmap.h:34
@ PF_RGB
32-bit RGB-bitmap, alpha channel can be ignored.
Definition IBitmap.h:49
@ PF_MONO
Monochrome bitmap.
Definition IBitmap.h:39
virtual int GetPixelBitsCount() const =0
Get total number of bits per single pixel.
virtual int GetLineBytesCount() const =0
Number of bytes per single line.
virtual void * GetLinePtr(int positionY)=0
Get pointer to buffer for single line.
virtual int GetLinesDifference() const =0
Get address difference between next and previous line.
virtual int GetPixelsDifference() const =0
Get address difference between next and previous pixel.
virtual bool IsFormatSupported(PixelFormat pixelFormat) const =0
Get true if the pixel format is supported by the bitmap implementation.
virtual PixelFormat GetPixelFormat() const =0
Get the bitmap's pixel format.
virtual const void * GetLinePtr(int positionY) const =0
Get pointer to buffer for single line.
virtual bool CreateBitmap(PixelFormat pixelFormat, const istd::CIndex2d &size, int pixelBitsCount=0, int componentsCount=0)=0
Create bitmap with specified size and format.
General definition of image contains pixels in regular grid.
Index implementation for addressing elements in 2D-space.
Definition CIndex2d.h:25
Memory block with optional deleting function used during destruction.
Definition COptMemory.h:21
Contains the system indenendent definitions of image and related themes.
Definition CBitmap.h:21

© Witold Gantzke and Kirill Lepskiy