I am trying to convert image to less size, in the past I was using
exec("convert ".$in." -colorspace gray -depth 8 -colors 16 ".$out);
since i have no longer access to exec, i am trying to use the php commands but have found no option how to make the -colors 16 property.
I am using this script:
$image=new Imagick();
$image->readImage($in);
$image->setImageColorspace(Imagick::COLORSPACE_GRAY);
$image->setImageDepth(8);
$image->setImageFileName($out);
$image->writeImage();
Can somebody give me a hint on the command to be used to define the colors?
Thanks
IvO