title: ImageMagick/Mogrify - compress image programmatically
body: <p>I'm trying to compress an image on the command line using Imagemagick in Perl (currently, I'm only able to flip it...)</p>
  
  <pre><code>system("/usr/bin/mogrify", "-flip","/var/www/images/$pid-$count.jpg");
  </code></pre>
  
  <p>The image must be compressed in size by 50%, but <strong>retain the same dimensions</strong>! I can resize an image fine, but how to <em>pixelate</em> the image to lower the resolution, but keep the same dimensions?</p>