I'm doing a site that has more than one interface/skins. Apart from the standard truecolor skin I have a 2 color b/w, 16 and 32 colors options. The problem is when I'm adding new graphical content - the thumbnails will always stand out because they are truecolor.
Is there a way to convert to multiple files having different user specified palettes using GDLIB?
Using the imagepalettecopy function seems to have no effect. I tried using it on 24bit png => 8bit indexed png and 8bit index png => 2bit index png.
Here's the code:
PHP:--------------------------------------------------------------------------------
header("Content-type: image/png");
$im_orig = imagecreatefrompng("shrek_p2.png");
$im_copy = imagecreatefrompng("shrek2.png");
// copy the palette
imagepalettecopy($im_orig, $im_copy);
imagepng($im_copy);
imagedestroy($im_copy);
Thanks in advance
- Summer