ADTF Display Toolbox
Loading...
Searching...
No Matches
image_intf.h
Go to the documentation of this file.
1
7#pragma once
9
10namespace adtf
11{
12
13namespace disptb
14{
15
16namespace graphicslib
17{
18
19namespace dengar
20{
21
27class IImage
28{
29public:
53 typedef enum
54 {
57
59 PF_8BIT = 10,
64
95 PF_RIII_10 = 30,
96 PF_RIII_12 = 31,
97 PF_RIII_14 = 32,
98 PF_RIII_16 = 33,
99 PF_BGR_555 = 34,
100 PF_BGR_565 = 35,
101
105 PF_GREYSCALE_18 = 41,
106 PF_GREYSCALE_20 = 42,
107 PF_GREYSCALE_22 = 43,
114
130
135
144
153
156
157 // Attention:
158 // When you change this enumeration, please change also the corresponding enumeration in the streaming
159 // lib(adtf_streaminglib_types.h)!!! Thank you.
160 } tPixelFormat;
161
165 typedef enum
166 {
167 LF_SWAP_RGB = 0x0001,
169 } tLoadFlags;
170
176 typedef enum
177 {
182 } tBlitFlags;
183
187 virtual tVoid Destroy() = 0;
188
194 virtual tInt GetPixelFormat() const = 0;
195
200 virtual tInt GetWidth() const = 0;
201
206 virtual tInt GetHeight() const = 0;
207
212 virtual tInt GetBitsPerPixel() const = 0;
213
220 virtual tInt GetBytesPerLine() const = 0;
221
226 virtual tInt GetSize() const = 0;
227
232 virtual tFloat64 GetRatio() const = 0;
233
239 virtual const tBitmapFormat* GetFormat() const = 0;
240
249
254 virtual tColor* GetPalette() const = 0;
255
260 virtual tInt GetPaletteSize() const = 0;
261
267 virtual tColor GetPaletteEntry(tInt nIdx) const = 0;
268
274 virtual tUInt8* GetBitmap() const = 0;
275
284 virtual tUInt8* GetBitmapLine(tInt nY) const = 0;
285
294 virtual tResult GetBits(tUInt8* pDestBitmapData, const tBitmapFormat* psDestBitmapFormat, tInt nFlags = 0) = 0;
295
296}; // class
297
298} // namespace dengar
299
300using dengar::IImage;
301} // namespace graphicslib
302
303} // namespace disptb
304
305} // namespace adtf
virtual tFloat64 GetRatio() const =0
Returns the aspect ratio of the image.
virtual tUInt8 * GetBitmap() const =0
Returns a pointer to the raw data.
virtual tResult GetBits(tUInt8 *pDestBitmapData, const tBitmapFormat *psDestBitmapFormat, tInt nFlags=0)=0
Retrieves the image's bitmap data.
virtual tInt GetPaletteSize() const =0
Returns the color palette size.
virtual tInt GetSize() const =0
Returns the size of the image in bytes.
virtual tColor * GetPalette() const =0
Returns the color palette.
virtual tInt GetWidth() const =0
Returns the width of the image.
tPixelFormat
The enum ePixelFormat specifies some common pixel formats, that is, descriptions of a byte to color m...
Definition image_intf.h:54
@ PF_BGRA_5551
16 bit BGRA (R: 5 bit, G: 5 bit, B: 5 bit, Alpha:1bit)
Definition image_intf.h:152
@ PF_32BIT
32 bit This definition is a placeholder a 32 Bit format, bitorder is undefined.
Definition image_intf.h:117
@ PF_RGB_888
24 bit RGB (R: 8 bit, G: 8 bit, B: 8 bit) - default format for 24 bpp
Definition image_intf.h:111
@ PF_GREYSCALE_FLOAT32
32 bit greyscale float value
Definition image_intf.h:129
@ PF_GREYSCALE_10
10 bit greyscale To setup Format use tBitmapFormat::nBitsPerPixel = 16 !
Definition image_intf.h:72
@ PF_YUV420P_888
24 bit YUV (Y: 8 bit, U: 8 bit, V: 8 bit) - Y = luminance, U+V = chrominance If using this format in ...
Definition image_intf.h:134
@ PF_16BIT
16 bit This definition is a placeholder a 16 Bit format, bitorder is undefined.
Definition image_intf.h:67
@ PF_RGBA_8888
32 bit RGBA (R: 8 bit, G: 8 bit, B: 8 bit, A: 8 bit) with alpha value - default format for 32 bpp
Definition image_intf.h:123
@ PF_RGB_555
15 bit RGB (R: 5 bit, G: 5 bit, B: 5 bit) - default format for 16 bpp
Definition image_intf.h:88
@ PF_xRGB_8888
32 bit aligned memory with only 24 Bit valid RGB data. A=255.
Definition image_intf.h:137
@ PF_RGB_565
16 bit RGB (R: 5 bit, G: 6 bit, B: 5 bit)
Definition image_intf.h:90
@ PF_BGRA_8888
32 bit BGRA (B: 8 bit, G: 8 bit, R: 8 bit, A: 8 bit) with alpha value - inverted RGB + A
Definition image_intf.h:125
@ PF_ARGB_1555
16 bit ARGB (R: 5 bit, G: 5 bit, B: 5 bit, Alpha:1bit)
Definition image_intf.h:146
@ PF_24BIT
24 bit This definition is a placeholder a 24 Bit format, bitorder is undefined.
Definition image_intf.h:104
@ PF_ABGR_1555
16 bit ABGR (R: 5 bit, G: 5 bit, B: 5 bit, Alpha:1bit)
Definition image_intf.h:150
@ PF_BGRx_8888
32 bit aligned memory with only 24 Bit valid RGB data. A=255.
Definition image_intf.h:143
@ PF_RGBx_8888
32 bit aligned memory with only 24 Bit valid RGB data. A=255.
Definition image_intf.h:141
@ PF_ARGB_8888
32 bit ARGB (A: 8 bit, R: 8 bit, G: 8 bit, B: 8 bit) with alpha value
Definition image_intf.h:119
@ PF_ABGR_8888
32 bit ABGR (A: 8 bit, B: 8 bit, G: 8 bit, R: 8 bit) with alpha value - inverted RGBA
Definition image_intf.h:121
@ PF_RGB_444
12 bit RGB (R: 4 bit, G: 4 bit, B: 4 bit)
Definition image_intf.h:86
@ PF_BGR_888
24 bit BGR (B: 8 bit, G: 8 bit, R: 8 bit) - inverted RGB
Definition image_intf.h:113
@ PF_GREYSCALE_8
8 bit greyscale - default format for 8 bpp
Definition image_intf.h:61
@ PF_xBGR_8888
32 bit aligned memory with only 24 Bit valid RGB data. A=255.
Definition image_intf.h:139
@ PF_GREYSCALE_12
12 bit greyscale To setup Format use tBitmapFormat::nBitsPerPixel = 16 !
Definition image_intf.h:77
@ PF_RGBA_5551
16 bit RGBA (R: 5 bit, G: 5 bit, B: 5 bit, Alpha:1bit)
Definition image_intf.h:148
@ PF_GREYSCALE_14
14 bit greyscale To setup Format use tBitmapFormat::nBitsPerPixel = 16 !
Definition image_intf.h:82
@ PF_ABGR_4444
16 bit ABGR (A: 4 bit, B: 4 bit, G: 4 bit, R: 4 bit) with alpha value - inverted RGBA
Definition image_intf.h:94
@ PF_RGB_8
8 bit RGB (R: 3 bit, G: 3 bit, B: 2 Bit) - palletized 8 bpp format
Definition image_intf.h:63
@ PF_RGBA_4444
16 bit RGBA (R: 4 bit, G: 4 bit, B: 4 bit, A: 4 bit) with alpha value
Definition image_intf.h:92
virtual tColor GetPaletteEntry(tInt nIdx) const =0
Returns a color palette entry.
virtual tInt GetPixelFormat() const =0
Returns the pixel format.
virtual tVoid Destroy()=0
Destroy the instance.
virtual tWin32BitmapInfo * GetBitmapInfo()=0
Generates a Win32 image descriptor.
virtual tInt GetBytesPerLine() const =0
Returns the bytes per line of the image.
tLoadFlags
The enum tLoadFlags specifies options available for image transformation.
Definition image_intf.h:166
@ LF_FLIP_VERTICAL
perform a vertical flip
Definition image_intf.h:168
@ LF_SWAP_RGB
this flag is ignored, since it is not longer needed
Definition image_intf.h:167
virtual const tBitmapFormat * GetFormat() const =0
Returns the current bitmap format of the image.
virtual tUInt8 * GetBitmapLine(tInt nY) const =0
Returns a pointer to raw data of a line.
virtual tInt GetBitsPerPixel() const =0
Returns the bits per pixel of the image.
tBlitFlags
This enumeration is used for the Blit function.
Definition image_intf.h:177
@ BLIT_VerticalFlip
Blit with vertical flip.
Definition image_intf.h:179
@ BLIT_DontStretch
Blit with no stretch and keep width-height-relation of image.
Definition image_intf.h:181
virtual tInt GetHeight() const =0
Returns the height of the image.
Copyright © Audi Electronics Venture GmbH.
Namespace for functionality provided by the Display Toolbox.
Main namespace.
Struct to specifie a bitmap.
Struct to get the informations and the color about a bitmap.