开云体育

Locked Roster Images Upside Down


 

Hello All,
I have my 2 locomotives in the JMRI roster now and I wanted to import images for my roster entries.? When I drag the image to the white box for the main image or the icon image under the media tab it imports it upside down no matter how the original image is orientated.? I didn't see an issue on JMRI GitHub.

JMRI version 4.12 +Rb6a9bb1

Thanks for your help,
Jeron


Jon Miller
 

开云体育

On 1/1/2019 3:33 PM, Shag wrote:
When I drag the image to the white box for the main image or the icon image under the media tab it imports it upside down no matter how the original image is orientated.

??? I running Win10 on a "Thinkcenter" and JMRI 4.15.1 using Digitrax LocoNet simulator.? I don't have that problem.

-- 
Jon Miller
For me time stopped in 1941
Digitrax  Chief/Zephyr systems, 
SPROG, JMRI User
NMRA Life member #2623
Member SFRH&MS


 

Could you please open an Issue on GitHub ( - free account required) and attach the image file(s) to it? I’d like to test with exactly the images you’re using.

Bob

On Jan 1, 2019, at 3:33 PM, Shag <shag.buck@...> wrote:

Hello All,
I have my 2 locomotives in the JMRI roster now and I wanted to import images for my roster entries. When I drag the image to the white box for the main image or the icon image under the media tab it imports it upside down no matter how the original image is orientated. I didn't see an issue on JMRI GitHub.

JMRI version 4.12 +Rb6a9bb1

Thanks for your help,
Jeron
--
Bob Jacobsen
rgj1927@...


 

May not be a player here but I have had that happen with pictures I took with my iPhone (turned sideways for landscape view) and then posted to web. I tried to fix it the original photo in a photo editor by rotating it then reposting it and it still was upside down. The problem was always in landscape mode holding my iPhone sideways. I turned my iPhone the other direction for another photo and repeated the up load and the problem went away. May be something about how the iPhone saves the image that makes it want to treat the landscape shots differently according to how you hold the phone. If your photos came from an iPhone or even some other brand, you may want to turn the phone in a different direction and try again.
Paul D


 

Paul,
Your comments are heading in the right direction.

Every Digital imaging device (cameras and scanners included) have a "normal"
orientation of the imaging device.

The majority of digital cameras (iPhone included) have an orientation sensing device to determine which way up you are holding the camera. Almost all cameras do not reprocess the image but simply set a Orientation tag value in the EXIF metadata incorporated in the image.

Many image reading devices/software respect the Orientation tag value and display the image with the correct rotation at display time.

Some email clients and web browsers may not respect the Orientation tag and as a result the image appears incorrectly.

I've never checked whether the image renderer(s) used by JMRI respect the Orientation tag and whether this has changed over JMRI versions. Also whether this is a platform-specific (Windows/Mac/Linux) problem.

I don't have time to do tests at present.
--
Dave in Australia

On 2 Jan 2019, at 3:29 PM, Paul Davidson <pdavidson@...> wrote:

May not be a player here but I have had that happen with pictures I took with my iPhone (turned sideways for landscape view) and then posted to web. I tried to fix it the original photo in a photo editor by rotating it then reposting it and it still was upside down.


 

I think Paul and Dave are on to something so I converted the images from JPEG to PNG and problem is solved.

Thanks for all your responses.


 

Marc,

Not at all. The iPhone behaves just like a "real man's camera" (we have those too). The problem is with some image rendering software.

If you hold the iPhone in landscape mode with the main camera lens (we are not considering the selfie camera) in the top corner and the power button at the top, the iPhone considers that the "normal" orientation and sets the EXIF orientation flag to Horizontal Normal. Just like my "real man's camera" when I hold it the right way up.

If I rotate the iPhone 90 degrees clockwise it sets the EXIF orientation flag to Rotate 90 CW. Just like my "real man's camera" when I rotate it 90 degrees clockwise.

If I rotate the iPhone 180 degrees clockwise it sets the EXIF orientation flag to Rotate 180. Just like my "real man's camera" when I hold it upside down.

If I open any of these images with any image processing software I use on my Mac (or use Quick-Look to preview them), they all appear Right Way Up (the Mac software uses the EXIF orientation flag to render the images the way they should be viewed.)

If I drag any of the rotated images (iPhone or "real man's camera") to a Roster Media window in JMRI, they show as if I've been standing on my head or lying on one side.

There are no problems with the iPhone nor the "real man's camera". The problem is that whatever we use to render JPEG images in JMRI (on the Mac at least) ignores the EXIF orientation flag embedded in the image and doesn't render the image in its corrected orientation.

What are Windows and Linux users seeing?
--
Dave in Australia

On 4 Jan 2019, at 1:20 PM, Marc <forfoum@...> wrote:

Another interesting quirk that never popped up or reported. So if the person does not hold the IPhone in proper orientation, the EXIF data can get really confused... Was upright landscape or inverted landscape :-) I never use an Iphone for pictures, prefer a real mans camera :-).


 

What happens if you drag an upside down image into JMRI?

John

---------- Original Message ----------
From: Dave Heap <dgheap@...>
Date: January 3, 2019 at 10:39 PM


Marc,

Not at all. The iPhone behaves just like a "real man's camera" (we have those
too). The problem is with some image rendering software.

If you hold the iPhone in landscape mode with the main camera lens (we are not
considering the selfie camera) in the top corner and the power button at the
top, the iPhone considers that the "normal" orientation and sets the EXIF
orientation flag to Horizontal Normal. Just like my "real man's camera" when I
hold it the right way up.

If I rotate the iPhone 90 degrees clockwise it sets the EXIF orientation flag
to Rotate 90 CW. Just like my "real man's camera" when I rotate it 90 degrees
clockwise.

If I rotate the iPhone 180 degrees clockwise it sets the EXIF orientation flag
to Rotate 180. Just like my "real man's camera" when I hold it upside down.

If I open any of these images with any image processing software I use on my
Mac (or use Quick-Look to preview them), they all appear Right Way Up (the Mac
software uses the EXIF orientation flag to render the images the way they
should be viewed.)

If I drag any of the rotated images (iPhone or "real man's camera") to a
Roster Media window in JMRI, they show as if I've been standing on my head or
lying on one side.

There are no problems with the iPhone nor the "real man's camera". The problem
is that whatever we use to render JPEG images in JMRI (on the Mac at least)
ignores the EXIF orientation flag embedded in the image and doesn't render the
image in its corrected orientation.

What are Windows and Linux users seeing?
--
Dave in Australia


On 4 Jan 2019, at 1:20 PM, Marc <forfoum@...> wrote:

Another interesting quirk that never popped up or reported. So if the
person does not hold the IPhone in proper orientation, the EXIF data can get
really confused... Was upright landscape or inverted landscape :-) I never
use an Iphone for pictures, prefer a real mans camera :-).


 

开云体育

I use Windows 7 and use jpeg images in my roster media. I have never had this orientation problem no matter what the source or format of the photo. Perhaps it is because I always use PhotoShop Elements to edit the photo to bring it down to a small file size. Image pictures are 600x450 pixels, icon images are 375x125 pixels. So, I imagine that the orientation is automatically “corrected” when I save the picture as a jpeg from PhotoShop.

?

Mark Granville


 

Mark,

Maybe the image is saved with no EXIF-data at all, which would also solve it for you.

Wouter


On Fri, 4 Jan 2019 at 13:44, Mark Granville <mfgranville@...> wrote:

I use Windows 7 and use jpeg images in my roster media. I have never had this orientation problem no matter what the source or format of the photo. Perhaps it is because I always use PhotoShop Elements to edit the photo to bring it down to a small file size. Image pictures are 600x450 pixels, icon images are 375x125 pixels. So, I imagine that the orientation is automatically “corrected” when I save the picture as a jpeg from PhotoShop.

?

Mark Granville


 

Simply saving with no EXIF data doesn't help at all unless the software has actually read, rotated and resaved the image (usually a lossy procedure for JPEG files).
--
Dave in Australia

On 5 Jan 2019, at 4:47 AM, whmvd <vandoornw@...> wrote:

Maybe the image is saved with no EXIF-data at all, which would also solve it for you.


 

开云体育

Our "real (wo)man's cameras" are Olympus OM-D E-M1. Other cameras we have owned are Pentax, Panasonic and Canon. All have display auto-rotate enabled and all store EXIF Orientation information, as do all photos friends with DSLRs have shared with us over the years.

All these images, plus all images taken by iPhones and iPads have displayed perfectly in almost every Mac imaging app we have used with them, including Adobe Photoshop. The only exception was a Microsoft product (Entourage or Outlook) we no longer use. It didn't correctly render images taken with the camera rotated, either our own images or ones sent to us.

We need to stop blaming cameras/iPhones etc. and look into how to code JMRI so it makes use of the worldwide EXIF Orientation tag standard.

I have raised an issue:



--
Dave in Australia


On 5 Jan 2019, at 3:04 PM, Marc <forfoum@...> wrote:

Fooled around with my FUJI FINEPIX S700. It does not auto-rotate. ?4 pics rotate thru 360 degree. Import images are as photographed. Drag&drop into ?
Roster media, images were as photographed.

Nikon D5000 with image auto rotate. 0/360 is correct. 45 and 180 are corrected in camera. the 90 image is upside down. ?Import into Win10 Photo Viewer three ?are correct, one is inverted. ?Drag&Drop to Roster media the are as photographed, one image ok all other on side or upside down.


 

开云体育

We need to stop blaming cameras/iPhones etc. and look into how to code JMRI so it makes use of the worldwide EXIF Orientation tag standard.

?

Why blame the end user? Maybe EXIF is just an unneeded complication. What do we care about the camera orientation? All we want is a picture where up is up. If we are an artist who wants a sideways picture, we can use photo editing software. Instead of adopting EXIF, the software coders for cameras etc. could have just made the camera always store an image in its right-side-up orientation so all software that imported it would get a properly oriented picture without additional coding in the end user software needed to make use of the EXIF.

?

I’ve noticed this problem with videos taken with a smart phone. If the phone was rotated, the video plays rotated in Windows Media player but plays right-side-up using QuickTime. They automatically rotate the screen display to look correct. Why not store it that way?

?

However, since the cat is out of the bag, I suppose JMRI coders will eventually have to add to the code. Did I say complication that probably shouldn’t have been introduced to begin with? Just another case of data overload?

?

Mark Granville


 

See the link if and discussion therein.

Would be great if somebody wanted to code an enhancement for this.

Bob

On Jan 5, 2019, at 5:58 AM, Mark Granville <mfgranville@...> wrote:

We need to stop blaming cameras/iPhones etc. and look into how to code JMRI so it makes use of the worldwide EXIF Orientation tag standard.
--
Bob Jacobsen
rgj1927@...