View previous topic :: View next topic |
Author |
Message |
Featherfoot Veteran
Joined: 28 Dec 2002 Posts: 1108 Location: Stuart, Florida
|
Posted: Mon Jul 20, 2015 2:48 am Post subject: "Rotate JPEG files so they work in old Picture Frame-SO |
|
|
I took a bunch of cell phone pictures on my last trip. When I try to display them in my old "Picture Frame." The portrait ones come out rotated 90 degrees. I believe that the orientation on newer JPEG files is just a status bit (or header setting.) Anyway, does anybody know of an application that can detect the orientation and rotate the image appropriately?
It doesn't have to be automatic. I have a lot of pictures but an application that would let me turn off the rotation setting and see the file would work.
Thanks for your help.
Last edited by Featherfoot on Mon Jul 20, 2015 3:48 pm; edited 1 time in total |
|
Back to top |
|
|
DawgG l33t
Joined: 17 Sep 2003 Posts: 866
|
Posted: Mon Jul 20, 2015 9:51 am Post subject: convert/mogrify |
|
|
i think it's very convenient to use convert or mogrify from imagemagick to rotate the picture itself.
Code: | convert -auto-orient input.jpg output.jpg | rotates the picture according to the postition in its jpeg-header or
Code: | convert -rotate 90 input.jpg output.jpg | rotates it 90° to the right.
if you use mogrify instead of convert the file is changed in-place.
to detect/change the rotation-settings in the jpeg-header itself you can use media-gfx/jhead; it can just display the rotation-filed and also auto-rotate the picture or just clear the rotation-filed in the header.
GOOD LUCK! _________________ DUMM KLICKT GUT. |
|
Back to top |
|
|
Featherfoot Veteran
Joined: 28 Dec 2002 Posts: 1108 Location: Stuart, Florida
|
Posted: Mon Jul 20, 2015 3:47 pm Post subject: |
|
|
I wrote a little bash script to reorient the 600 pictures in my directory
for f in *.jpg
do
convert -auto-orient $f ../Pictures-NPLT-rot/$f
echo "File $f done"
done
echo "Complete!"
I could have made it general purpose, but this worked.
Thank you for your help. |
|
Back to top |
|
|
|