I'm converting .jpg and .gif images to .png using PHP's Imagick library.
I've successfully converted these images to .png using this:
$image = new Imagick( $file_path );
$image->setImageFormat( 'png' );
$image->writeImage( $file_path );
However, I have been unable to compress the .pngs or control their final size at all. I've tried using the following line before $image->setImageFormat() and a few other variations with no success:
$img->setImageCompressionQuality( 95 );
If .png compression with Imagick is lacking, then what other utilities should I use to compress these files?
This manual may help.