JPG photos - Follow the orientation tag

Discussion about the Geocaching Australia web site
Post Reply
MavEtJu
Posts: 486
Joined: 07 January 15 9:15 pm
Twitter: @mavetju
Location: Caringbah
Contact:

JPG photos - Follow the orientation tag

Post by MavEtJu » 01 October 15 10:37 am

See http://geocaching.com.au/gallery/log/12058613/.

The original photo shows properly in my browser: Sky at the top.
And in my image viewer: Sky at the top.

But once uploaded here, it shows upside down after being resized with the sky at the bottom:
http://geocaching.com.au/gallery/images ... 058613.jpg
http://geocaching.com.au/gallery/images ... 058613.jpg

Looking at the EXIF data, the Orientation tag doesn't get copied when the resizing has been done:
http://imgur.com/RV4oBmj

Can this orientation tag please be honoured before it gets stripped?

Edwin

User avatar
caughtatwork
Posts: 17015
Joined: 17 May 04 12:11 pm
Location: Melbourne
Contact:

Re: JPG photos - Follow the orientation tag

Post by caughtatwork » 01 October 15 10:45 am

Sorry, no. We don't want to assume anything, so you get to do all the hard work.

MavEtJu
Posts: 486
Joined: 07 January 15 9:15 pm
Twitter: @mavetju
Location: Caringbah
Contact:

Re: JPG photos - Follow the orientation tag

Post by MavEtJu » 01 October 15 12:07 pm

caughtatwork wrote:Sorry, no. We don't want to assume anything, so you get to do all the hard work.
Where is your code repository, I'll fix it myself.

Edwin

User avatar
caughtatwork
Posts: 17015
Joined: 17 May 04 12:11 pm
Location: Melbourne
Contact:

Re: JPG photos - Follow the orientation tag

Post by caughtatwork » 01 October 15 12:12 pm

Sorry, that's not the way we do our development. Our code while is open source is not available to the public for security reasons.

If you are willing to develop a PHP function that will take a file, read the EXIF data and orient the output using imagemagick then we'd look at incorporating it. Of course, the function will need to cater for all EXIF formats, not just the one you are currently looking at. i.e. It needs to be a "fix all" scenario.

MavEtJu
Posts: 486
Joined: 07 January 15 9:15 pm
Twitter: @mavetju
Location: Caringbah
Contact:

Re: JPG photos - Follow the orientation tag

Post by MavEtJu » 01 October 15 2:10 pm

caughtatwork wrote:Sorry, that's not the way we do our development. Our code while is open source is not available to the public for security reasons.
It's either open source or is it not. Try again.
And if it is not available for security reasons I strongly suggest to scrap it all and do it over again in a secure manner.

So if you want to rephrase your earlier answer, I'm more than happy to forget this one and continue improving the website.

Edwin

User avatar
CraigRat
850 or more found!!!
850 or more found!!!
Posts: 7015
Joined: 23 August 04 3:17 pm
Twitter: CraigRat
Facebook: http://facebook.com/CraigRat
Location: Launceston, TAS
Contact:

Re: JPG photos - Follow the orientation tag

Post by CraigRat » 01 October 15 3:34 pm

Found a solution..Can be done pretty simply by the looks of it.

I'll have a play on the weekend and see if it works.

BTW: Our code for the site isn't and hasn't been built in a way that is easily distributable/open, nor do we claim it to be so (other than where we do) :lol: .

MavEtJu
Posts: 486
Joined: 07 January 15 9:15 pm
Twitter: @mavetju
Location: Caringbah
Contact:

Re: JPG photos - Follow the orientation tag

Post by MavEtJu » 01 October 15 3:37 pm

CraigRat wrote:Found a solution..Can be done pretty simply by the looks of it.

I'll have a play on the weekend and see if it works.
Cool, you're a hero! (So is the other one :-)

Edwin

User avatar
Richary
8000 or more caches found
8000 or more caches found
Posts: 4189
Joined: 04 February 04 10:55 pm
Location: Waitara, Sydney

Re: JPG photos - Follow the orientation tag

Post by Richary » 02 October 15 10:02 pm

As the photos I rarely take are too large for uploading to the site, with the recommendation to resize them (10 MB off the digital camera, and whatever off the iPhone) I tend to load them up in Paint on Windows, resize (and rotate if necessary) then save. That tends to get rid of the exif info.

User avatar
CraigRat
850 or more found!!!
850 or more found!!!
Posts: 7015
Joined: 23 August 04 3:17 pm
Twitter: CraigRat
Facebook: http://facebook.com/CraigRat
Location: Launceston, TAS
Contact:

Re: JPG photos - Follow the orientation tag

Post by CraigRat » 03 October 15 6:41 pm

I've tested successfully on my dev box and the new server, however the software on the current server is a little too old to have it work magically.

Once the new server is up (I'm aiming for the end of next month) it'll come good.

Sorry for the delay with the new server. I could write a book about the last 6-8 months! Things have gone back to as normal as possible, giving me time to swear at the new box a bit more and sort out the outstanding 'features'.

Post Reply