Started to add koala output format.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5578 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2012-03-05 20:30:25 +00:00
parent 15a8a51aa2
commit 8c1aed8b0f
6 changed files with 193 additions and 0 deletions

View File

@@ -178,3 +178,19 @@ Pixel GetPixel (const Bitmap* B, unsigned X, unsigned Y)
unsigned GetBitmapColors (const Bitmap* B)
/* Get the number of colors in an image. The function will return the number
* of palette entries for indexed bitmaps and 2^24 for non indexed bitmaps.
*/
{
switch (B->Type) {
case bmMonochrome: return 2;
case bmIndexed: return B->Pal->Count;
case bmRGB:
case bmRGBA: return (1U << 24);
default: Internal ("Unknown bitmap type %u", B->Type);
}
}