#include <cSurfaceInfo.h>
Like cSurfaceInfo but allows compressed formats. Just cast tagBITMAPINFO or tagBITMAPINFOHEADER to this.
- Note
- MUST have NO vtable to cast properly!
-
this might be a compressed image format. biCompression
◆ cSurfaceBitmapInfo() [1/2]
GrayLib::cSurfaceBitmapInfo::cSurfaceBitmapInfo |
( |
| ) |
|
|
inlinenoexcept |
◆ cSurfaceBitmapInfo() [2/2]
GrayLib::cSurfaceBitmapInfo::cSurfaceBitmapInfo |
( |
const cSurfaceInfo & |
rInfo | ) |
|
|
inline |
◆ get_BitsPerPixel()
BIT_SIZE_t GrayLib::cSurfaceBitmapInfo::get_BitsPerPixel |
( |
| ) |
const |
|
inlinenoexcept |
◆ get_ColorSize()
size_t GrayLib::cSurfaceBitmapInfo::get_ColorSize |
( |
void |
| ) |
const |
|
inlinenoexcept |
this == pointer to DIB header (BITMAPINFOHEADER NOT BITMAPCOREHEADER)
- Returns
- number of bytes in the DIB's color table.
◆ get_ColorTablePtr()
tagRGBQUAD* GrayLib::cSurfaceBitmapInfo::get_ColorTablePtr |
( |
| ) |
const |
|
inlinenoexcept |
◆ get_Height()
PIXELS_t GrayLib::cSurfaceBitmapInfo::get_Height |
( |
void |
| ) |
const |
|
inlinenoexcept |
y in pixels. Always positive.
◆ get_HeightRaw()
PIXELS_t GrayLib::cSurfaceBitmapInfo::get_HeightRaw |
( |
| ) |
const |
|
inlinenoexcept |
y in pixels. <0 = top down (normal) else bottom up Win GDI weird mode.
- Note
- Might be negative for windows y flip topdown bullshit in non compressed modes.
◆ get_ImageSize()
size_t GrayLib::cSurfaceBitmapInfo::get_ImageSize |
( |
| ) |
const |
|
noexcept |
Size of the image info for the DIB. Can be overridden by biSizeImage if supplied. else same as get_SurfaceSize()
- Note
- bmi.bmiHeader.biPlanes MUST ALWAYS be 1 in the file !
- Returns
- Max size of the bitmap image data.
◆ get_NumColors()
WORD GrayLib::cSurfaceBitmapInfo::get_NumColors |
( |
void |
| ) |
const |
returns a number of colors in the DIB's color table. this == pointer to DIB header (BITMAPINFOHEADER NOT BITMAPCOREHEADER)
- Note
- If this is a Windows style DIB, the number of colors in the color table can be less than the number of bits per pixel allows for (i.e. this->biClrUsed can be set to some value). If this is the case, return the appropriate value.
- Returns
- Number of colors.
◆ get_PitchBytes()
size_t GrayLib::cSurfaceBitmapInfo::get_PitchBytes |
( |
| ) |
const |
get stride/bytes per row. in most cases it must be 4 or 8 byte aligned ? (AKA Pitch, Stride or BytesPerRow)
- Note
- Must use the 32 bit scan line boundary.
◆ get_PixelDataPtr()
BYTE * GrayLib::cSurfaceBitmapInfo::get_PixelDataPtr |
( |
| ) |
const |
get pointer to pixel data. ASSUME This is cast from a REAL tagBITMAPINFO
◆ get_PixelFormat()
◆ get_SurfaceSize()
size_t GrayLib::cSurfaceBitmapInfo::get_SurfaceSize |
( |
| ) |
const |
|
noexcept |
Recalculate the biSizeImage
◆ get_TotalSize()
size_t GrayLib::cSurfaceBitmapInfo::get_TotalSize |
( |
| ) |
const |
|
noexcept |
Get the total size needed.
◆ get_Width()
PIXELS_t GrayLib::cSurfaceBitmapInfo::get_Width |
( |
void |
| ) |
const |
|
inlinenoexcept |
◆ InitZero()
void GrayLib::cSurfaceBitmapInfo::InitZero |
( |
| ) |
|
|
inlinenoexcept |
◆ isCompressed()
bool GrayLib::cSurfaceBitmapInfo::isCompressed |
( |
| ) |
const |
|
inlinenoexcept |
biCompression = FOURCC code for compression. except BI_JPEG
◆ isTopDown()
bool GrayLib::cSurfaceBitmapInfo::isTopDown |
( |
| ) |
const |
|
inlinenoexcept |
◆ isValidInfo()
bool GrayLib::cSurfaceBitmapInfo::isValidInfo |
( |
| ) |
const |
◆ SetCopy()
void GrayLib::cSurfaceBitmapInfo::SetCopy |
( |
const tagBITMAPINFO & |
rCopy | ) |
|
◆ SetHeightTopDown()
void GrayLib::cSurfaceBitmapInfo::SetHeightTopDown |
( |
| ) |
|
|
inlinenoexcept |
VFW compressor needs this to be turned off!
◆ SetSurfaceInfo()
void GrayLib::cSurfaceBitmapInfo::SetSurfaceInfo |
( |
const cSurfaceInfo & |
rInfo | ) |
|
Set the _WIN32 tagBITMAPINFO version of the cSurfaceInfo. reverse of SetBitmapInfo()
- Note
- GDI uses y<0 = topdown.
The documentation for this class was generated from the following files: