Page 1 of 1

Pictures get rotated to previous state after uploading...

Posted: Sun Aug 24, 2008 4:11 am
by vargadanis
Hi!

It's been long since I last posted here. RL sucks ^_^
I wrote a small script that uploads pictures then resamples them. I have a bit of problem with it.
So let's say I take a picture with my camera in standing format:

Code: Select all

+----+
|    |
|    |
+----+
and not in landscape:

Code: Select all

+-------+
|       | 
+-------+
I upload them from my camera to the computer and use FSpot to rotate them into the right position. (Usually means 90 degrees to the left)
After I pick the already rotated picture to upload and resample it is handled in it's original orientation. Therefore the picture that was shot in a standing format and then rotated to landscape is uploaded as standing and not as landscape.
What can I do with this?

PS: I needed to small character pics because I am not sure that these are the words I am to use for the orientation of the picture

Re: Pictures get rotated to previous state after uploading...

Posted: Sun Aug 24, 2008 4:26 am
by onion2k
By the sound of it this "FSpot" app isn't actually rotating the image, it's just changing the rotation marker in the image's EXIF data. Try rotating the image with something else.

Re: Pictures get rotated to previous state after uploading...

Posted: Sun Aug 24, 2008 5:02 am
by vargadanis
I see... I thought that it will be something like that...
Do you happen to know any tools that will actually rotate the picture? And it must be simple enough so that my parents can use it so photoshop, gimp are out of question.

Re: Pictures get rotated to previous state after uploading...

Posted: Sun Aug 24, 2008 6:40 am
by onion2k
Irfanview is about the best free one.

Alternatively, if your server has the exif reader extension and GD, you could write something that automatically rotates them proper using PHP. There's some examples of how to do that in the PHP manual comments. Eg http://uk.php.net/manual/en/function.ex ... .php#76964

Re: Pictures get rotated to previous state after uploading...

Posted: Sun Aug 24, 2008 7:26 am
by vargadanis
Thanx for the tips :)