A couple of photos on my disk were somehow destroyed in aspect ratio. It seems that the image turned in the same aspect ratio.
I now want to fix it with the following script (bash MAC).
Code: Select all
for file in *.jpg;
do
read f width height < <(identify -format "%f %w %h" "$file")
convert $f -rotate 270 temp-$f
mogrify -resize $heightx$width\! temp-$f;
done
A sample image can be found here: https://dl.dropboxusercontent.com/u/272993/IMG_0060.jpg
I tried everything for a couple of hours now but am completely clueless. Thank you for your help.