Open igittigitt opened 5 years ago
An acceptable solution for me is this:
$bw_img = $converter->convertToIndexedColor($img, $palette, 0.8);
imagefilter($bw_img, IMG_FILTER_NEGATE);
imagetruecolortopalette($bw_img, true, 2);
imagecolorset($bw_img, 0, 255, 255, 255);
imagecolorset($bw_img, 1, 0, 0, 0);
I use the following code with your lib to achieve a monochrome image with just black and white pixels in it (1 Bit colordepth):
But the resulting imagefile is written as RGB with 8-Bit colordepth:
I've tried to add filters, like found on the Internet, but they seem to have no effect on the output format: