blob: a5c6a04b64fb649ff4341008a1681abb6223dbcb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
/**
* Regression test for <https://github.com/libgd/libgd/issues/307>
*
* We're testing that an image that has been converted to palette with
* GD_QUANT_NEUQUANT has its trueColor flag unset.
*/
#include "gd.h"
#include "gdtest.h"
int main()
{
gdImagePtr im;
im = gdImageCreateTrueColor(100, 100);
gdTestAssert(gdImageTrueColorToPaletteSetMethod(im, GD_QUANT_NEUQUANT, 0));
gdImageTrueColorToPalette(im, 0, 256);
gdTestAssert(!gdImageTrueColor(im));
gdImageDestroy(im);
return gdNumFailures();
}
|