Remove invalid ASSERT() from PngFormat::onSave()

The assert can fail if we try to save an indexed image which contain
more than 256 colors.
This commit is contained in:
David Capello 2015-07-30 18:49:35 -03:00
parent fba9213c9c
commit 792502fc7b

View File

@ -385,7 +385,6 @@ bool PngFormat::onSave(FileOp* fop)
if (image->pixelFormat() == IMAGE_INDEXED) {
int c, r, g, b;
int pal_size = fop_sequence_get_ncolors(fop);
ASSERT(pal_size > 0 && pal_size <= PNG_MAX_PALETTE_LENGTH);
pal_size = MID(1, pal_size, PNG_MAX_PALETTE_LENGTH);
#if PNG_MAX_PALETTE_LENGTH != 256