Previous Thread
Next Thread
Print Thread
Hop To
Images in Gallery flip 90 degrees #258386 05/03/2016 1:52 PM
Joined: Aug 2006
Posts: 584
Basil Offline OP
old hand
OP Offline
old hand
Joined: Aug 2006
Posts: 584
Not sure if this is a bug or intended operation, but hoping there is a way to prevent this. When I add a picture to the gallery that is in portrait mode on my computer, the gallery flips it 90 degrees. For example, this picture:

It is Portrait mode on my computer, but as you see, it get's flipped on its side when I upload it here. Hope I can fix this as I am using UBB for a Photography forum.


Attached Files IMG_2224 copy.jpg
Last edited by Basil; 05/03/2016 1:53 PM.
Express Hosting
Re: Images in Gallery flip 90 degrees [Re: Basil] #258387 05/03/2016 2:33 PM
Joined: Apr 2004
Posts: 1,450
isaac Online Splat
UBB.threads Developer
Online Splat
UBB.threads Developer
Joined: Apr 2004
Posts: 1,450
Let me guess, you took this photo with an Apple iPhone. Am I correct?

When you attach files to your post, the file is stored exactly as it is given to store it. There is no processing done to it, since the file could be either a jpg, png, animated gif, txt file or pdf document... or movie format, etc. The attachment manager does just that, it attaches something to your post. The inlining of the attached file is just a courtesy - whether it be an image or a pdf preview.

The iPhone stores the image rotation exif detsils within the photo - rather than actually rotating the pixels within the file.

Your browser interprets each picture as it chooses. Some browsers look at the exif information, and rotate the image. Some browsers do not. Some browsers ignore the exif information when the image is surounded by html. but if the image is viewed on its own, the browser lookes at the image's exif data. this is done for speed. Apple doesnt respect this,and instead of saving the image in the orientation which it was taken, it just adds a rotation request to the exif data.

more information on that, at:
http://www.ubbdev.com/forums/ubbthreads.php/topics/320994l#Post320994


This topic was just recently discussed in detail and with examples a few months ago at:
http://www.ubbcentral.com/forums/ubbthreads.php/topics/257017#Post257017

Last edited by id242; 05/03/2016 2:58 PM.

isaac @ id242.com // my forum @ CelicaHobby.com
a current developer of UBB.threads php forum software // 7.7.2 released!
Re: Images in Gallery flip 90 degrees [Re: Basil] #258388 05/03/2016 2:51 PM
Joined: Dec 2003
Posts: 5,904
Ruben Offline
Offline
Joined: Dec 2003
Posts: 5,904
with the advent of iphone,ipad and other pda's most times the image is taken when sideways or upside down.(owner error)
The actual picture is rotated to what is taken landscape,portrait in the software of the portable device to view with that device.
At least it attempts to.
when uploaded ,the picture is sent raw to the site,with no corrections since it does not know what orientation it should be.
However it is, upside down,sideways etc. It is sent in that format.
Now maybe we can get in the future a edit tool to correct that. Or at least a rotate tool when viewing But then it is a difficult task to achieve when using many different browsers.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Re: Images in Gallery flip 90 degrees [Re: Basil] #258389 05/03/2016 3:32 PM
Joined: Aug 2006
Posts: 584
Basil Offline OP
old hand
OP Offline
old hand
Joined: Aug 2006
Posts: 584
It was taken with an iPhone. That might explain it. Here is a picture of the same thing taken in portrait mode with my Canon 6D.

Attached Files SanDiego Dec 2015-3-21.jpg
Last edited by Basil; 05/03/2016 3:49 PM.
Re: Images in Gallery flip 90 degrees [Re: Basil] #258390 05/03/2016 3:41 PM
Joined: Dec 2003
Posts: 5,904
Ruben Offline
Offline
Joined: Dec 2003
Posts: 5,904
Well all you can do it test it with the iphone upright then sideways.
I would suspect that the photo was taken in landscape to fit in the screen.
The iphone will rotate the picture to whatever orientation you hold the phone after you take the picture.
Then poof you upload it and it is sideways.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Re: Images in Gallery flip 90 degrees [Re: Ruben] #258391 05/03/2016 4:22 PM
Joined: Aug 2006
Posts: 584
Basil Offline OP
old hand
OP Offline
old hand
Joined: Aug 2006
Posts: 584
Originally Posted by Ruben
Well all you can do it test it with the iphone upright then sideways.
I would suspect that the photo was taken in landscape to fit in the screen.
The iphone will rotate the picture to whatever orientation you hold the phone after you take the picture.
Then poof you upload it and it is sideways.


That make sense but why does it look like Portrait mode when I view the picture on the computer?

Re: Images in Gallery flip 90 degrees [Re: Basil] #258392 05/03/2016 4:28 PM
Joined: Jun 2006
Posts: 15,838
Gizmo Online Tapedshut
UBB.threads Developer
Online Tapedshut
UBB.threads Developer
Joined: Jun 2006
Posts: 15,838
Images uploaded via the Attachment Manager are not compressed or rotated by the forum. Instead, you should use the Gallery Forums feature (which has received extensive work in the last month), so that your images will be compressed, rotated, and displayed in a more optimized format for photo albums.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Need to Upgrade?
Forums: A Gardeners Forum Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Re: Images in Gallery flip 90 degrees [Re: Basil] #258393 05/03/2016 4:33 PM
Joined: Apr 2004
Posts: 1,450
isaac Online Splat
UBB.threads Developer
Online Splat
UBB.threads Developer
Joined: Apr 2004
Posts: 1,450
Originally Posted by Basil
but why does it look like Portrait mode when I view the picture on the computer?


already answered that, here:

Originally Posted by id242
Your browser interprets each picture as it chooses. Some browsers look at the exif information, and rotate the image. Some browsers do not. Some browsers ignore the exif information when the image is surounded by html. but if the image is viewed on its own, the browser lookes at the image's exif data. this is done for speed.
...
more information on that, at:
http://www.ubbdev.com/forums/ubbthreads.php/topics/320994l#Post320994


and what Gizmo just posted, regarding "file attachements" and "image galleries"


isaac @ id242.com // my forum @ CelicaHobby.com
a current developer of UBB.threads php forum software // 7.7.2 released!
Re: Images in Gallery flip 90 degrees [Re: Basil] #258394 05/03/2016 4:36 PM
Joined: Apr 2004
Posts: 1,450
isaac Online Splat
UBB.threads Developer
Online Splat
UBB.threads Developer
Joined: Apr 2004
Posts: 1,450
https://www.ubbcentral.com/forums/ub...Number/2062/filename/IMG_2224%20copy.jpg

when you click that link, your image probably displays the way you intended it. this is your browser reading the image exif details. if the image was surounded by html code, it would ignore the exif image data. this is done for browser speed. its totslly up to the browser youre using, if it respects the exif information, and when it uses it. chrome and firefox handle things differently than ie. and edge is its own beast.


isaac @ id242.com // my forum @ CelicaHobby.com
a current developer of UBB.threads php forum software // 7.7.2 released!
Re: Images in Gallery flip 90 degrees [Re: Basil] #258396 05/03/2016 4:39 PM
Joined: Dec 2003
Posts: 5,904
Ruben Offline
Offline
Joined: Dec 2003
Posts: 5,904
Originally Posted by Basil
Originally Posted by Ruben
Well all you can do it test it with the iphone upright then sideways.
I would suspect that the photo was taken in landscape to fit in the screen.
The iphone will rotate the picture to whatever orientation you hold the phone after you take the picture.
Then poof you upload it and it is sideways.


That make sense but why does it look like Portrait mode when I view the picture on the computer?


As stated in your case only the browser deals with the image file and rotates it for you.
Next time it may not.
But viewing in ubb does not,depending on how it was uploaded.

FYI the second picture attachment was perfect in portrait mode, At least for me.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Re: Images in Gallery flip 90 degrees [Re: Basil] #258408 05/03/2016 9:54 PM
Joined: Apr 2004
Posts: 1,450
isaac Online Splat
UBB.threads Developer
Online Splat
UBB.threads Developer
Joined: Apr 2004
Posts: 1,450
I've added a ROTATE button to the lightbox. The end user can now rotate the image to whatever 90d angle they wish.
The drawback to this, is users rotating larger images on smaller screens, will have parts of the image display off the screen for 90d and 180d rotations.

Will this work out for you?


isaac @ id242.com // my forum @ CelicaHobby.com
a current developer of UBB.threads php forum software // 7.7.2 released!

Additional Community Resources
UBB Developers
UBB Wiki
ShoutChat Box
Recent Topics
Video Tags
by Outdoorking - 07/16/2019 2:39 AM
Two minor issues after upgrade
by Baldeagle - 07/13/2019 7:33 PM
Can the users have the option of hiding sub boards?
by tinker123 - 07/12/2019 9:55 PM
Database Issue
by Outdoorking - 07/12/2019 8:28 PM
My wishlist.
by Ruben - 07/08/2019 4:04 PM
Who's Online Now
3 registered members (Gizmo, Morgan, Zarzal), 274 guests, and 226 spiders.
Key: Admin, Global Mod, Mod
Member Spotlight
Posts: 45
Joined: April 2019
Show All Member Profiles 
Forum Statistics
Forums35
Topics35,302
Posts192,590
Members11,857
Most Online978
Jun 24th, 2007
Random Gallery Image
Latest Photos
The Sky
Land Rocks
Cozy Places
Trees
Powered by UBB.threads™ PHP Forum Software 7.7.2