ADTF_DISPLAY_TOOLBOX  3.8.0 (ADTF 3.14.3)
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 
138  PF_CUSTOM = 1000
139 
140  // Attention:
141  // When you change this enumeration, please change also the corresponding enumeration in the streaming lib(adtf_streaminglib_types.h)!!!
142  // Thank you.
144 
148  typedef enum
149  {
150  LF_SWAP_RGB = 0x0001,
151  LF_FLIP_VERTICAL = 0x0002
153 
159  typedef enum
160  {
164  BLIT_DontStretch = 0x02
166 
167 
171  virtual tVoid Destroy() = 0;
172 
178  virtual tInt GetPixelFormat() const = 0;
179 
184  virtual tInt GetWidth() const = 0;
185 
190  virtual tInt GetHeight() const = 0;
191 
196  virtual tInt GetBitsPerPixel() const = 0;
197 
204  virtual tInt GetBytesPerLine() const = 0;
205 
210  virtual tInt GetSize() const = 0;
211 
216  virtual tFloat64 GetRatio() const = 0;
217 
223  virtual const tBitmapFormat* GetFormat() const = 0;
224 
225 
234 
239  virtual tColor* GetPalette() const = 0;
240 
245  virtual tInt GetPaletteSize() const = 0;
246 
252  virtual tColor GetPaletteEntry(tInt nIdx) const = 0;
253 
254 
260  virtual tUInt8* GetBitmap() const = 0;
261 
270  virtual tUInt8* GetBitmapLine(tInt nY) const = 0;
271 
272 
281  virtual tResult GetBits(tUInt8* pDestBitmapData, const tBitmapFormat* psDestBitmapFormat, tInt nFlags = 0) = 0;
282 
283 }; //class
284 
285 }
286 
287 using dengar::IImage;
288 }
289 
290 }
291 
292 }
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_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_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_24BIT
24 bit This definition is a placeholder a 24 Bit format, bitorder is undefined.
Definition: image_intf.h:105
@ 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_GREYSCALE_12
12 bit greyscale To setup Format use tBitmapFormat::nBitsPerPixel = 16 ! the most significant (upper)...
Definition: image_intf.h:78
@ 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:149
@ LF_FLIP_VERTICAL
perform a vertical flip
Definition: image_intf.h:151
@ LF_SWAP_RGB
this flag is ignored, since it is not longer needed
Definition: image_intf.h:150
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:160
@ BLIT_VerticalFlip
Blit with vertical flip.
Definition: image_intf.h:162
@ BLIT_DontStretch
Blit with no stretch and keep width-height-relation of image.
Definition: image_intf.h:164
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.