4

i use imagetruecolortopallete to reducebit image from 24 bit rgb to 8 bit rgb but result image not beautiful as same as from tinypng.com how can i do ?

original image 24 bit rgb

image 8 bit rgb convert by my code

24bit

8bit bad

image 8 bit rgb convert by tinypng.com

8bit ok

[Spektre]: sorry for not whole image but I lost the patience the source link is too slow/unstable (this took ~20 min after 3th attempt to download it ...)

<?php
$im = imagecreatetruecolor(1024, 768);
imagetruecolortopalette($im, true, 255);
imagepng($im, 'cat.png');
imagedestroy($im);
?>
Spektre
  • 49,595
  • 11
  • 110
  • 380
peat ribersal
  • 93
  • 1
  • 7
  • see [Effective gif/image color quantization](http://stackoverflow.com/a/30265253/2521214) If you got too high colors dynamic range then the only option is dithering... WoW those links of yours are SLOOOW – Spektre Dec 13 '15 at 07:40

0 Answers0