Previous Thread
Next Thread
Print Thread
Hop To
Joined: Aug 2006
Posts: 583
old hand
old hand
Joined: Aug 2006
Posts: 583
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.

Attachments
IMG_2224 copy.jpg

Last edited by Basil; 05/03/2016 1:53 PM.
Joined: Apr 2004
Posts: 1,945
Likes: 145
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,945
Likes: 145
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:
https://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:
https://www.ubbcentral.com/forums/ubbthreads.php/topics/257017#Post257017

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

Current developer of UBB.threads PHP Forum Software
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Dec 2003
Posts: 6,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78
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
Joined: Aug 2006
Posts: 583
old hand
old hand
Joined: Aug 2006
Posts: 583
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.
Attachments
SanDiego Dec 2015-3-21.jpg

Last edited by Basil; 05/03/2016 3:49 PM.
Joined: Dec 2003
Posts: 6,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78
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
Joined: Aug 2006
Posts: 583
old hand
old hand
Joined: Aug 2006
Posts: 583
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?

Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
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.
Do you need Forum Install or Upgrade Services?
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!
Joined: Apr 2004
Posts: 1,945
Likes: 145
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,945
Likes: 145
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:
https://www.ubbdev.com/forums/ubbthreads.php/topics/320994l#Post320994

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


Current developer of UBB.threads PHP Forum Software
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Apr 2004
Posts: 1,945
Likes: 145
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,945
Likes: 145
https://www.ubbcentral.com/forums/u...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.


Current developer of UBB.threads PHP Forum Software
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Dec 2003
Posts: 6,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78
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
Joined: Apr 2004
Posts: 1,945
Likes: 145
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,945
Likes: 145
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?


Current developer of UBB.threads PHP Forum Software
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
2 members (Havenofsobriety, rootman), 624 guests, and 106 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)