ImageMagick/Mogrify - compress image programmatically

Viewed 13202

I'm trying to compress an image on the command line using Imagemagick in Perl (currently, I'm only able to flip it...)

system("/usr/bin/mogrify", "-flip","/var/www/images/$pid-$count.jpg");

The image must be compressed in size by 50%, but retain the same dimensions! I can resize an image fine, but how to pixelate the image to lower the resolution, but keep the same dimensions?

1 Answers
Related