This Help forum is for issues relates to the latest release (1.7.4). For issues related to beta or github version please use their own Help forum.
Before asking for help please read "How to request help" by clicking on that tab above here."
  • Page:
  • 1

TOPIC:

Media image auto rotates itself 4 years 10 months ago #1

  • ArchPrime
  • ArchPrime's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 55
Hi, I have not encountered this before so assume it is a new feature of 1.7.4, but I just found when adding a new media image, for some reason now it gets automatically rotated to landscape orientation.

The source file displays in it's native portrait orientation when opened in windows. Image dimensions 2592 px vertically x 1936 px horizontally.

How do I overcome this auto rotate feature? Is there an image orientation toggle somewhere I can use? If not, should this be added as a feature for contributors with no image editing software?
Website: www.kingfamily.prime.net.nz
Webtrees version 2.07

Please Log in or Create an account to join the conversation.

Media image auto rotates itself 4 years 10 months ago #2

  • fisharebest
  • fisharebest's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 14491
There is no code in webtrees that would do this.

> The source file displays in it's native portrait orientation when opened in windows

I guess that **windows** is rotating the image, and that webtrees is showing the original orientation.

> 2592 px vertically x 1936 px horizontally.

Digital cameras are landscape. Your image is portrait. I guess you had the camera on its side, then your camera stored the orientation in the .JPEG, and windows is autorotating.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Media image auto rotates itself 4 years 10 months ago #3

  • ArchPrime
  • ArchPrime's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 55
Thanks.

A bit odd though in that windows does not otherwise auto rotate for me. (would be great if it did somehow recognize intended orientation), and none of the other photos I added previously (under previous webtrees versions) have encountered this issue.

Unlike the others, this image source was an Apple Ipad - perhaps that has some bearing, given that tablets inherently autorotate depending on orientation of tablet. Perhaps some metadata associated with image that windows recognizes but web trees doesn't?
Website: www.kingfamily.prime.net.nz
Webtrees version 2.07

Please Log in or Create an account to join the conversation.

Media image auto rotates itself 4 years 10 months ago #4

  • kiwi
  • kiwi's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 4986

ArchPrime wrote: Thanks.

A bit odd though in that windows does not otherwise auto rotate for me. (would be great if it did somehow recognize intended orientation), and none of the other photos I added previously (under previous webtrees versions) have encountered this issue.

Unlike the others, this image source was an Apple Ipad - perhaps that has some bearing, given that tablets inherently autorotate depending on orientation of tablet. Perhaps some metadata associated with image that windows recognizes but web trees doesn't?


Actually the issue is exactly the opposite to that. Apple devices, because they are designed to allow you to take "upright" images regardless of the devices orientation an so all have an inbuilt ability to self-correct.

Windows devices don't have such an ability, so what has happened is that the image you recorded is actually the problem. You were holding the iPad at an orientation that Apple can recognize, but not anything else. Your only solutions are to not use Apple devices for such pictures; or figure out what the "normal" orientation is (compatible with other devices) and use that always; or rotate the image in a Windows based software before uploading. It's not something webtrees can fix.

I've seen the same problem on forums when someone posts an image taken with an iPhone.
Nigel

www.our-families.info

Hosted at:
Follow me at:

Please Log in or Create an account to join the conversation.

Last edit: by kiwi.

Media image auto rotates itself 4 years 10 months ago #5

  • ArchPrime
  • ArchPrime's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 55
Hi thanks Nigel. Actually not my Ipad & I am not expecting too many more images from the owner, so no particular problem for me - but what is interesting for me (in a purely academic way) is that however it was rotated on the Ipad, if I open that same image file in windows, it always appears the intended way up (portrait orientation) without any further rotation being done or required in windows.

It seems like windows just decides image file orientation differently to web trees

The metadata I can see associated with the image when I right click properties in windows (assuming this is actually hard metadata recorded in the file, rather than windows reporting its own conclusions) lists 'width 1926 pixels', 'height =2592 pixels', and that is exactly how it displays.

Webtrees presumably does not read or use this metadata? or uses another method to infer orientation?

If I rotate the image to landscape orientation in windows, to compensate for the different way web trees will display it, any user who downloads that image will then presumably see it displaying in the wrong orientation again back in windows (and I am guessing on a Mac as well)

I guess what I am leading up to is a wish that webtrees would reach the same conclusions as windows as to how images are oriented
Website: www.kingfamily.prime.net.nz
Webtrees version 2.07

Please Log in or Create an account to join the conversation.

Last edit: by ArchPrime.

Media image auto rotates itself 4 years 10 months ago #6

  • kiwi
  • kiwi's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 4986
I'm not sure quite what you mean by "I open the image in Windows", as operating systems don't open images. Only software does that, so you must be referring to a web browser, or Windows Explorer, or some piece of image editing or display software. Whatever that is will be relevant to understanding the issue.

You might need to try Googling the problem. It's been around since Apple released IOS 5 for iPhones and iPads. Here's just one commentary on the issue: www.cnet.com/how-to/why-does-my-iphone-take-upside-down-photos/
Nigel

www.our-families.info

Hosted at:
Follow me at:

Please Log in or Create an account to join the conversation.

Media image auto rotates itself 4 years 10 months ago #7

  • ArchPrime
  • ArchPrime's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 55
Fair comment. What I should have said is that every application I have in windows capable of opening and displaying images opens this image in the same portrait orientation (IrfanView, MS paint, Corel Draw, Chrome, MS outlook etc).

I wonder if this is after all a slightly different issue to the one referred to in that article? In this case windows (or apps running under windows) is not disagreeing with the Ipad as to orientation, and only webtrees seems to encounter a difficulty.

I tried embedding the offending image into this post using the attachment 'insert' function, but it looks like this bulletin board is not parsing image attachments correctly


Cheers

*** EDIT - I just tested and see WordPress also has same issue with the file.

Confirming Nigel's point, I found this www.organicweb.com.au/20257/wordpress/iphone-photo/

Why are images rotating incorrectly?

Quite simply, the rotating photo problem happens with photos taken with Apple iPad or iPhone devices: Most modern digital camera devices record various information in the image file. This is called Exif data and includes GPS coordinates (if available), camera make and model, exposure information and so on. iOS devices record the orientation Exif information in a way that other cameras don’t. This means that many services and software don’t understand the orientation of photos taken on iOS devices. Because data is available in regards to the Exif orientation of a particular photo, the external service or software will try to understand the orientation however often gets the orientation incorrect as the data is not what is expected.

There is absolutely no reason why Apple can’t fix their iOS apps to rotate the JPEG properly. Apple should fix their apps instead of pushing their problem out to the entire Web. Mozilla Bugzilla, 2011

So, in summary, this (almost) always is a problem when photos are taken with Apple devices.


Which suggests to me that windows and Apple platforms can use the non standard EXIF data as Ipad intends, even if web software like webtrees & wordpress can not

Wordpress has a plugin to deal with this - wordpress.org/plugins/ios-images-fixer/
Website: www.kingfamily.prime.net.nz
Webtrees version 2.07

Please Log in or Create an account to join the conversation.

Last edit: by ArchPrime.

Media image auto rotates itself 4 years 10 months ago #8

> Image dimensions 2592 px vertically x 1936 px horizon
> I tried embedding the offending image into this post using the attachment 'insert' function, but it looks like this bulletin board is not parsing image attachments correctly

There is a size limitation on what you can attach to a post. Currently, the maximum width and height is set to 1200px.
Rob
www.skatekey.net ( webtrees beta GitHub)
PHP 7.4.14, MySql 7.4.14, Apache 2.4.43,
Hosted at tigertech.net

Please Log in or Create an account to join the conversation.

Do you need a web hosting solution for your webtrees site?
If you prefer a host that specialises in webtrees, the following page lists some suppliers able to provide one for you: 

Media image auto rotates itself 4 years 10 months ago #9

  • bertkoor
  • bertkoor's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Greetings from Utrecht, Holland
  • Posts: 2268
This problem is far more widespread than just iPads & webtrees. I have personally observed this with pictures taken with my own digital camera, it's always a surprise how these will show in any random picture browser.

Cause of this is that the camera sets a EXIF metadata tag holding the orientation of the picture, but you're totally at the mercy of whatever you're going to use for viewing whether (and to what extent) this extra piece of essential information is respected in the final rendering. Some more in-depth articles about this widespread problem (first hits I got by googling for "jpeg metadata orientation") :
www.impulseadventure.com/photo/exif-orientation.html
www.daveperrett.com/articles/2012/07/28/...andling-is-a-ghetto/

My guess is that webtrees does not depend on the web browser for rendering pictures, but defers this to an external PHP library that can put watermarks on images as part of the Media Firewall. So maybe this actually is an issue with that external library.

My advice: always run pictures through an image editor prior to uploading images. Not only to fix the orientation, but also to scale it down to reasonable proportions so webtrees can make a thumbnail image (which can cause issues if server memory is low)
stamboom.BertKoor.nl runs on webtrees v1.7.13

Please Log in or Create an account to join the conversation.

Media image auto rotates itself 4 years 10 months ago #10

  • ArchPrime
  • ArchPrime's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 55

bertkoor wrote:
My advice: always run pictures through an image editor prior to uploading images. Not only to fix the orientation, but also to scale it down to reasonable proportions so webtrees can make a thumbnail image (which can cause issues if server memory is low)


Thanks Bertkoor. Unfortunately, this doesn't seem to solve the issue for people wanting to download a copy of the image from website for their own use (my intention is to permit this, using website as a repository of full quality images, as I have a very small number of users, and am assuming server capacity will only increase over time)

I tested rotating the image in a windows image editor so that it is corrected for web trees, but found for anyone downloading the image again from web trees to display on their own computer, it will be wrongly oriented again.

Ideally there would be a utility that just rewrites EXIF data on IOS or other camera image files to correct non standard orientation value flags, so they display consistently on all platforms. No luck googling this so far though.

I also read that since windows 8, windows apps generally handle the IOS orientation issue ok, but windows 7 apps often do not - so user outcome would depend on windows version. Also that rotating images in some apps like Windows Photo Viewer will corrupt the EXIF data
Website: www.kingfamily.prime.net.nz
Webtrees version 2.07

Please Log in or Create an account to join the conversation.

Last edit: by ArchPrime.

Media image auto rotates itself 4 years 10 months ago #11

The file on your site has Format: application/octet-stream not image/jpeg
Try opening the file in a photo editor and then save as jpg

For editing EXIF, you may try Exif pilot www.colorpilot.com/exif.html
webtrees 2.0.16 at visitusinmaputo.com/webtree PHP 7.4.16
webtrees 2.0 dev on local WampServer PHP 7.4.9

Please Log in or Create an account to join the conversation.

Last edit: by HRN.
  • Page:
  • 1
Powered by Kunena Forum