ADTF Display Toolbox
image_intf.h
Go to the documentation of this file.
1 
7 #pragma once
9 
10 
11 namespace adtf
12 {
13 
14 namespace disptb
15 {
16 
17 namespace graphicslib
18 {
19 
20 namespace dengar
21 {
22 
28 class IImage
29 {
30 public:
54  typedef enum
55  {
58 
60  PF_8BIT = 10,
64  PF_RGB_8 = 12,
65 
68  PF_16BIT = 20,
87  PF_RGB_444 = 25,
89  PF_RGB_555 = 26,
91  PF_RGB_565 = 27,
96  PF_RIII_10 = 30,
97  PF_RIII_12 = 31,
98  PF_RIII_14 = 32,
99  PF_RIII_16 = 33,
100  PF_BGR_555 = 34,
101  PF_BGR_565 = 35,
102 
105  PF_24BIT = 40,
106  PF_GREYSCALE_18 = 41,
107  PF_GREYSCALE_20 = 42,
108  PF_GREYSCALE_22 = 43,
115 
118  PF_32BIT = 50,
131 
136 
145 
154 
156  PF_CUSTOM = 1000
157 
158  // Attention:
159  // When you change this enumeration, please change also the corresponding enumeration in the streaming lib(adtf_streaminglib_types.h)!!!
160  // Thank you.
162 
166  typedef enum
167  {
168  LF_SWAP_RGB = 0x0001,
169  LF_FLIP_VERTICAL = 0x0002
171 
177  typedef enum
178  {
182  BLIT_DontStretch = 0x02
184 
185 
189  virtual tVoid Destroy() = 0;
190 
196  virtual tInt GetPixelFormat() const = 0;
197 
202  virtual tInt GetWidth() const = 0;
203 
208  virtual tInt GetHeight() const = 0;
209 
214  virtual tInt GetBitsPerPixel() const = 0;
215 
222  virtual tInt GetBytesPerLine() const = 0;
223 
228  virtual tInt GetSize() const = 0;
229 
234  virtual tFloat64 GetRatio() const = 0;
235 
241  virtual const tBitmapFormat* GetFormat() const = 0;
242 
243 
252 
257  virtual tColor* GetPalette() const = 0;
258 
263  virtual tInt GetPaletteSize() const = 0;
264 
270  virtual tColor GetPaletteEntry(tInt nIdx) const = 0;
271 
272 
278  virtual tUInt8* GetBitmap() const = 0;
279 
288  virtual tUInt8* GetBitmapLine(tInt nY) const = 0;
289 
290 
299  virtual tResult GetBits(tUInt8* pDestBitmapData, const tBitmapFormat* psDestBitmapFormat, tInt nFlags = 0) = 0;
300 
301 }; //class
302 
303 }
304 
305 using dengar::IImage;
306 }
307 
308 }
309 
310 }
Image and bitmap handling.
Definition: image_intf.h:29
virtual tFloat64 GetRatio() const =0
Returns the aspect ratio of the image.
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 tUInt8 * GetBitmap() const =0
Returns a pointer to the raw data.
virtual const tBitmapFormat * GetFormat() const =0
Returns the current bitmap format of the image.
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:55
@ PF_BGRA_5551
16 bit BGRA (R: 5 bit, G: 5 bit, B: 5 bit, Alpha:1bit)
Definition: image_intf.h:153
@ PF_32BIT
32 bit This definition is a placeholder a 32 Bit format, bitorder is undefined.
Definition: image_intf.h:118
@ PF_RGB_888
24 bit RGB (R: 8 bit, G: 8 bit, B: 8 bit) - default format for 24 bpp
Definition: image_intf.h:112
@ PF_GREYSCALE_FLOAT32
32 bit greyscale float value
Definition: image_intf.h:130
@ PF_GREYSCALE_10
10 bit greyscale To setup Format use tBitmapFormat::nBitsPerPixel = 16 ! the most significant (upper)...
Definition: image_intf.h:73
@ 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:135
@ PF_16BIT
16 bit This definition is a placeholder a 16 Bit format, bitorder is undefined.
Definition: image_intf.h:68
@ 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:124
@ PF_RGB_555
15 bit RGB (R: 5 bit, G: 5 bit, B: 5 bit) - default format for 16 bpp
Definition: image_intf.h:89
@ PF_xRGB_8888
32 bit aligned memory with only 24 Bit valid RGB data. A=255.
Definition: image_intf.h:138
@ PF_RGB_565
16 bit RGB (R: 5 bit, G: 6 bit, B: 5 bit)
Definition: image_intf.h:91
@ 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:126
@ PF_ARGB_1555
16 bit ARGB (R: 5 bit, G: 5 bit, B: 5 bit, Alpha:1bit)
Definition: image_intf.h:147
@ PF_24BIT
24 bit This definition is a placeholder a 24 Bit format, bitorder is undefined.
Definition: image_intf.h:105
@ PF_ABGR_1555
16 bit ABGR (R: 5 bit, G: 5 bit, B: 5 bit, Alpha:1bit)
Definition: image_intf.h:151
@ PF_BGRx_8888
32 bit aligned memory with only 24 Bit valid RGB data. A=255.
Definition: image_intf.h:144
@ PF_RGBx_8888
32 bit aligned memory with only 24 Bit valid RGB data. A=255.
Definition: image_intf.h:142
@ 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:120
@ 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:122
@ PF_RGB_444
12 bit RGB (R: 4 bit, G: 4 bit, B: 4 bit)
Definition: image_intf.h:87
@ PF_BGR_888
24 bit BGR (B: 8 bit, G: 8 bit, R: 8 bit) - inverted RGB
Definition: image_intf.h:114
@ PF_GREYSCALE_8
8 bit greyscale - default format for 8 bpp
Definition: image_intf.h:62
@ PF_xBGR_8888
32 bit aligned memory with only 24 Bit valid RGB data. A=255.
Definition: image_intf.h:140
@ PF_GREYSCALE_12
12 bit greyscale To setup Format use tBitmapFormat::nBitsPerPixel = 16 ! the most significant (upper)...
Definition: image_intf.h:78
@ PF_RGBA_5551
16 bit RGBA (R: 5 bit, G: 5 bit, B: 5 bit, Alpha:1bit)
Definition: image_intf.h:149
@ PF_GREYSCALE_14
14 bit greyscale To setup Format use tBitmapFormat::nBitsPerPixel = 16 ! the most significant (upper)...
Definition: image_intf.h:83
@ 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:95
@ PF_RGB_8
8 bit RGB (R: 3 bit, G: 3 bit, B: 2 Bit) - palletized 8 bpp format
Definition: image_intf.h:64
@ 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:93
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 tColor * GetPalette() const =0
Returns the color palette.
virtual tUInt8 * GetBitmapLine(tInt nY) const =0
Returns a pointer to raw data of a line.
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:167
@ LF_FLIP_VERTICAL
perform a vertical flip
Definition: image_intf.h:169
@ LF_SWAP_RGB
this flag is ignored, since it is not longer needed
Definition: image_intf.h:168
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:178
@ BLIT_VerticalFlip
Blit with vertical flip.
Definition: image_intf.h:180
@ BLIT_DontStretch
Blit with no stretch and keep width-height-relation of image.
Definition: image_intf.h:182
virtual tInt GetHeight() const =0
Returns the height of the image.
Copyright © Audi Electronics Venture GmbH.
Main namespace.
Struct to specifie a bitmap.
Struct to get the informations and the color about a bitmap.