Now the palette is created with the given number of colors.

This commit is contained in:
David Capello 2010-05-30 10:48:37 -03:00
parent 018aeffa47
commit 399d613a76

View File

@ -465,6 +465,7 @@ SpriteImpl::SpriteImpl(Sprite* sprite, int imgtype, int width, int height, int n
case IMAGE_RGB:
case IMAGE_INDEXED:
get_default_palette()->copyColorsTo(&pal);
pal.resize(ncolors);
break;
// For black and white images