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?
ImageMagick provides the
-compressswitch, which might do what you want.check this example/experiment: