PixelImage Wiki
Image editor / converter for MCU-based embedded projects
Status: Beta
Brought to you by:
tsx777
SBM (Simple BitMap) is native format for PixelImage.
File header
Delphi/Pascal:
type
TSBitmapFileHeader = record
dwID: cardinal;
dwSize: cardinal;
dwDataVersion: cardinal;
dwReserved1: cardinal;
dwReserved2: cardinal;
dwReserved3: cardinal;
dwReserved4: cardinal;
dwOffset: cardinal;
end;
C/C++
typedef struct _sbm_hdr_file {
uint32_t dwID;
uint32_t dwSize;
uint32_t dwDataVersion;
uint32_t dwReserved[4];
uint32_t dwOffset;
} sbm_hdr_file_t;
where:
Bitmap Info header
Delphi/Pascal
TSBitmapInfoHeader = record
sbwWidth: word;
sbwHeight: word;
sbdwFormat: TSPixelFormat;
sbcCompression: byte;
sbdwRowSize: cardinal;
sbdwDataSize: cardinal;
sbcColorUsed: word;
end;
C/C++
typedef struct _sbm_hdr_bitmap {
uint16_t sbwWidth;
uint16_t sbwHeight;
uint8_t sbwFormat;
uint8_t sbwCompression;
uint32_t sbwRowSize;
uint32_t sbwDataSize;
uint16_t sbwColorUsed;
} sbm_hdr_bitmap_t;
where:
Palette entries
Each entry is 24-bit BGR color.
tagRGBTRIPLE = packed record
rgbtBlue: Byte;
rgbtGreen: Byte;
rgbtRed: Byte;
end;
or
typedef struct _rgbtriple {
uint8_t rgbtBlue;
uint8_t rgbtGreen;
uint8_t rgbtRed;
} rgbtriple_t;