note 42999 added to function.imagetruecolortopalette

From: Date: Sun, 06 Jun 2004 13:34:12 +0000
Subject: note 42999 added to function.imagetruecolortopalette
Groups: php.notes 
Request: Send a blank email to php-notes+get-70695@lists.php.net to get a copy of this message
The palette created by this function often looks quite awful (at least it did on all of my test images). A better way to convert your true-colour images is by first making a resized copy of them with imagecopyresampled() to a 16x16 pixel destination. The resized image then contains only 256 pixels, which is exactly the number of colours you need. These colours usually look a lot better than the ones generated by imagetruecolortopalette(). The only disadvantage to this method I have found is that different-coloured details in the original image are lost in the conversion. ---- Manual Page -- http://www.php.net/manual/en/function.imagetruecolortopalette.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+42999 Delete -- http://master.php.net/manage/user-notes.php?action=delete+42999&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+42999&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#70695) next »