| 261 | |
| 262 | |
| 263 | ILAPI ILboolean ILAPIENTRY ilIsValidPal(ILpal *Palette) |
| 264 | { |
| 265 | if (Palette == NULL) |
| 266 | return IL_FALSE; |
| 267 | if (Palette->PalSize == 0 || Palette->Palette == NULL) |
| 268 | return IL_FALSE; |
| 269 | switch (Palette->PalType) |
| 270 | { |
| 271 | case IL_PAL_RGB24: |
| 272 | case IL_PAL_RGB32: |
| 273 | case IL_PAL_RGBA32: |
| 274 | case IL_PAL_BGR24: |
| 275 | case IL_PAL_BGR32: |
| 276 | case IL_PAL_BGRA32: |
| 277 | return IL_TRUE; |
| 278 | } |
| 279 | return IL_FALSE; |
| 280 | } |
| 281 | |
| 282 | |
| 283 | //! Closes Palette and frees all memory associated with it. |