Save PNG as PNG-8 with Floyd-Steinberg 2 dithering like GIMP in PHP

731 Views Asked by At

In GIMP I can save an image for Web with these properties:

enter image description here

  • PNG-8
  • 256 colors palette
  • Dither: Floyd-Steinberg / Floyd-Steinberg 2 / positioned

With these options I can reduce upto about 70% of the size of the image file without evident quality loss.

How can I get the same result with PHP?

The resulting image must preserve transparency.

I know almost nothing about image compression, encoding, palette, etc.

Edit: I posted a new question with a PHP script to do that, so I'll close this question or I'll answer it.

PHP wrong result for imagetruecolortopalette with PNG with transparency

0

There are 0 best solutions below