title: Resize image to one resolution
body: <p>I have a bunch of images, with different resolution.
  Also there is a mix of landscape and portrait pictures. I need to resize the images to one resolution (1024x768). If i have a portrait picture, the max height needs to be 768, and my landscape pictures has to have a max width of 1024. </p>
  
  <p>The space that is over, has to be made black.
  Right now i use <code>mogrify -resize 1024x768 -verbose *.jpg</code></p>
  
  <p>I know i can use 1024x!768 , but like i said i'm using different kind of pictures. 
  My exif information also doesn't contains information about if a picture is landscape or not.</p>