I'm trying to use Imagick via php to generate a 8bit bmp from jpg. But i would like the pixel colors to start at index 16 rather than 0. The code below shows how to generate the bmp in the correct format i need, but the palette index defaults to 0. Is there a way to make sure the palette start at another index?
$average = new Imagick( "icon.jpg" ); $average->setCompression(Imagick::COMPRESSION_NO); $average->quantizeImage( 32, Imagick::COLORSPACE_RGB, 0, false, false ); imagecolorset ($average, 0, 255, 255, 255); $average->setImageFormat( "bmp" ); header( "Content-Type: image/bmp" ); echo $average; $average->clear(); $average->destroy();