MCPcopy Create free account
hub / github.com/DentonW/DevIL / iCheckOS2

Function iCheckOS2

DevIL/src-IL/src/il_bmp.cpp:156–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154
155
156ILboolean iCheckOS2 (const OS2_HEAD * CONST_RESTRICT Header)
157{
158 if ((Header->bfType != ('B'|('M'<<8))) || (Header->DataOff < 26) || (Header->cbFix < 12))
159 return IL_FALSE;
160 if (Header->cPlanes != 1)
161 return IL_FALSE;
162 if (Header->cx == 0 || Header->cy == 0)
163 return IL_FALSE;
164 if (Header->cBitCount != 1 && Header->cBitCount != 4 && Header->cBitCount != 8 &&
165 Header->cBitCount != 24)
166 return IL_FALSE;
167
168 return IL_TRUE;
169}
170
171
172//! Reads a .bmp file

Callers 2

iIsValidBmpFunction · 0.85
iLoadBitmapInternalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected