anyKode Marilou
ContentsIndexHome
PreviousUpNext
Marilou::Commons::SurfaceFormats Enumeration

Surfaces formats describes how pixels are stored in the image.

C++
enum SurfaceFormats {
  UnknowFormat = -1,
  X8R8G8B8 = 1,
  R8G8B8 = 2,
  BW8 = 3,
  JPG = 4,
  B8G8R8 = 5,
  MONO1 = 6
};

Marilou.Commons.h

Members 
Description 
UnknowFormat = -1 
Unknown format. 
X8R8G8B8 = 1 
Bitmap, 32 bits for each pixel. This is native the format. The pixel is stored with RGB format (24 bits) plus 1 byte (8 bits) for the X value. 
R8G8B8 = 2 
Bitmap, 24 bits for each pixel. This is a software computed format. 
BW8 = 3 
8 bits grey level format. This is a software computed format. 
JPG = 4 
JPG format. This is, in most cases, a software computed format. (Some video cards are able to produce JPG directly) 
B8G8R8 = 5 
Bitmap, 24 bits for each pixel. This is a software computed format. 
MONO1 = 6 
Binary format, 1 bit per pixel. This is a software computed format. 

Several formats are available : see description of each enum for getting more information. 

R means 'Red', G means 'green' and B means 'Blue'. R,G and B values type is BYTE (8 bits). the 'X' value is an empty BYTE (8 bits) used by video card for generating 'transparency'. For the output image, X value can be ignored. 

 

Excepted for the JPG format, surface line bytes size is 32 bits aligned. Marilou extracts images from the video card in native mode X8R8G8B8: this is the fastest way for extracting images. Then, we recommend you to work with this format that is the native video card mode. Others formats are computed by software. 

 

The image bites must be 32 bits aligned excepted for MONO1 that must be 8 bits aligned.

Documentation v4.7 (18/01/2015), Copyright (c) 2015 anyKode. All rights reserved.
What do you think about this topic? Send feedback!