vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, all. I have a couple of digital cameras. they show up as external discs, and I use Nautilus to copy the images over to my computer, where I work on them with Gimp. I wrote to short scripts to rotate the images, but it occured to me that some cameras store the orientation of the image. I can see this if I ask Nautilus to display the contents of a directory as an "Image Collection". I see a panel on the right hand side with a field "Orientation"; normal orientation is "top - left", and if I turn the camera on its side before shooting, this is noted as "left - bottom", for example. So, instead of manually looking through the images, and rotating them, I could write a script that reads the orientation from the file, and automatically rotates those images that require it. But, I tried looking at a JPEG file using "strings img_01.jpg | more" and while this showed some information, orientation was not there. Nor was it marked when I clicked MB3 on a file, chose Properties, Image tab. How can I extract the orientation information from a JPEG? Beef. |
| |||
| 25 Jan 2006 19:34 UTC, Beef typed: > I wrote to short scripts to rotate the images, but it occured to me that > some cameras store the orientation of the image. Have a look at one of the programs that can read EXIF data. 'exif' or 'exiftags' for example. 'exif *.jpg |grep Orientation' yields a list that you could utilise in a script to rotate automatically. Did you have to enable the orientation sensing in the camera? I've been looking at some pics taken by someone else using a Fuji A330. They're mixed landscape and portrait format, yet the output of the above command reports 'Top, Left-Hand' for all. |
| |||
| On Wed, 25 Jan 2006 22:03:23 +0000, Chiefy wrote: > 25 Jan 2006 19:34 UTC, Beef typed: >> I wrote to short scripts to rotate the images, but it occured to me that >> some cameras store the orientation of the image. > > Have a look at one of the programs that can read EXIF data. 'exif' or > 'exiftags' for example. > > 'exif *.jpg |grep Orientation' > > yields a list that you could utilise in a script to rotate automatically. > > Did you have to enable the orientation sensing in the camera? I've been > looking at some pics taken by someone else using a Fuji A330. They're > mixed landscape and portrait format, yet the output of the above command > reports 'Top, Left-Hand' for all. Thanks, that looks to be exactly what I want. Looking around, I find that there's a program called jpegexiforient that would probably take care of rotating the images. Beef. |
| ||||
| On Wed, 25 Jan 2006 22:03:23 +0000, Chiefy wrote: > 25 Jan 2006 19:34 UTC, Beef typed: >> I wrote to short scripts to rotate the images, but it occured to me >> that some cameras store the orientation of the image. > > Have a look at one of the programs that can read EXIF data. 'exif' or > 'exiftags' for example. > > 'exif *.jpg |grep Orientation' > > yields a list that you could utilise in a script to rotate > automatically. > > Did you have to enable the orientation sensing in the camera? I've been > looking at some pics taken by someone else using a Fuji A330. They're > mixed landscape and portrait format, yet the output of the above command > reports 'Top, Left-Hand' for all. I've had a quick look at some of my photos using exiftags. Pictures taken with my old Sony camcorder all have the same value for the orientation field, regardless of the way I held the camera. Pictures taken with my newer Canon have a correct value for this field. My scripts use convert to rotate the image; the field is not updated. Thanks for your help, Beef. |