Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
"Rotate JPEG files so they work in old Picture Frame-SOLVED
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
Featherfoot
Veteran
Veteran


Joined: 28 Dec 2002
Posts: 1108
Location: Stuart, Florida

PostPosted: Mon Jul 20, 2015 2:48 am    Post subject: "Rotate JPEG files so they work in old Picture Frame-SO Reply with quote

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
View user's profile Send private message
DawgG
l33t
l33t


Joined: 17 Sep 2003
Posts: 866

PostPosted: Mon Jul 20, 2015 9:51 am    Post subject: convert/mogrify Reply with quote

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
View user's profile Send private message
Featherfoot
Veteran
Veteran


Joined: 28 Dec 2002
Posts: 1108
Location: Stuart, Florida

PostPosted: Mon Jul 20, 2015 3:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum