Image Well image being flipped

Hi,

Can someone please confirm the following behaviour.

Open a new desktop project. Add an Image-well to the window. Select the Image-well and in the inspector choose a JPG image.

Now using the navigator switch between either the window and the JPG image or the Image-well and the JPG image.

Does the image flip vertically?

I’m seeing this happen in the xojo IDE on windows 7 but It is also happening in an app compiled using Xojo in an about box. The image flips each time I display the about box.

Is this a bug or am I missing something?

Regards

Andy
I’ve tested it on Realstudio 2012 R2.1 and the app still works fine.

Hello Andy !
I’ve had the same problem with resizing an image
i’ve just submitted a feedback for this feedback://showreport?report_id=27265

Currently the only workaround i’ve found is to use canvas.backdrop, instead of the imagewell, to show the image

Hi Matteo,

Thanks for the workaround, for my purposes that works really well.

I will add my info to the feedback case.

Regards

Andy

A canvas does not solve the problem in my case. The image is still flipped. However, the behavior is different from image well. If I use image well the image is flipped, if I close the sub form and open it again the image is NOT flipped. Closing the sub form again and re open it and the image is flipped again.
If I use a canvas the image is allways flipped.

[quote=18864:@Dierk Walter]A canvas does not solve the problem in my case. The image is still flipped. However, the behavior is different from image well. If I use image well the image is flipped, if I close the sub form and open it again the image is NOT flipped. Closing the sub form again and re open it and the image is flipped again.
If I use a canvas the image is allways flipped.[/quote]
The same thing happens with bevel buttons in Windows, the icon rotates 180’ on every mouse enter event or each time the debugger is run in the IDE. I believe there have already been numerous bug reports submitted on the graphics issues in Windows and the problem has reportedly been identified and fixed, but I have no idea when the bug-fix release is coming.

Hi Carl,
Have you tried Xojo2013r2b4?

Spam much?

that control has nothing to do with Xojo.

Just ran into this bug with Xojo 2015r2.2 on Windows. JPG images get flipped when loaded into an ImageWell. Other image formats are fine. OS X is fine. It’s specific to JPG images in an ImageWell on Windows. I’ll put together a test project for Feedback.

I could not reproduce the bug. I tried a plain jpg, as well as a jpg taken upside down, in case the flip was due to exif information.

Looking forward to your report demonstrating the issue.

The fact that it manifest only with jpg may offer a workaround : in Open, create a new picture the same size, drawinto imagewell image into it, then replace it by the new picture.

Just by curiosity I played again with 2013R1 where the bug is obnoxious. Amazingly enough, the flip seems to happen when running the project ; if the picture shows fine in the IDE, it goes upside down in the running program. If it shows upside down in the IDE, it shows normal in the running program. Hopeless.

The bug is consistently reproducible with the project and pictures attached to this Feedback case.

feedback://showreport?report_id=39543 Picture.Open Rotates some JPGs on Windows

[quote=191239:@Frederick Roller]The bug is consistently reproducible with the project and pictures attached to this Feedback case.

feedback://showreport?report_id=39543 Picture.Open Rotates some JPGs on Windows[/quote]

This is not the same bug as what happened with previous version. Actually, it is not a bug, it seems to be a feature. Image Well honors EXIF orientation data on Windows.

See https://duckduckgo.com/?q=photos+orientation+data
I loaded both pictures at http://www.viewexifdata.com/ and indeed the landscape shows upside down and the riffle rotated 90 degrees.

The issue gets muddled by the fact that Preview on Mac or Photos on PC do not honor EXIF orientation. Oh, and even worse, on Mac Xojo does not honor EXIF orientation data either.

Dragging the picture in the project on Windows shows it as upside down or rotated as well. Which means Xojo Windows honors EXIF data all the way. Photographically, it is rather nice.

Looking at the standard at http://en.wikipedia.org/wiki/Exchangeable_image_file_format I see two workarounds, probably both valid and proceeding with the same principle :

  • Load the picture with a stream to a memoryBlock or a string
  • Either remove or modify the EXIF orientation value
  • Save the picture to a TemporaryFolderItem
  • Load that cleaned up version.

Seems to be the same as feedback://showreport?report_id=39543 and feedback://showreport?report_id=38228. This link also provides similar info. This would not be a feature though, if image display is truly cross-platform then it should display the same on any of the supported platforms. Seems like Michel’s suggestion of “look at the EXIF data and rotate” before display should provide a solid “one method” to display the image the same all the time regardless of platform. And if this was a “feature” then a note on the LR should be required to properly communicate this “feature”.

Thanks @Michel Bujardet for the research, results and suggestions.

The project attached to the Feedback case uses Picture.Open and then displays the pictures in both an ImageWell and Canvas. The results are the same in both controls. At least they’re consistent.

Consistency across platforms would make life easier. Honoring EXIF data on Windows, OS X and Linux would be nice because it would provide cross-platform consistency and present the pictures “correctly”.

The solution I’m considering is providing the user a means of rotating the pictures to whatever orientation they prefer.

39554 - EXIF rotation in Windows ImageWell and LoadPicture() should be mentioned in the LR

Steps: Look at the thread https://forum.xojo.com/1840-image-well-image-being-flipped/ starting at May 28.

It appears Windows honors the rotation information inside jpg pictures (in the example posted by Frederick Roller coming from an iPhone),
so he ends up with a landscape picture upside down and a table sideways.

That feature is very nice, but it does not exist on Mac (yet ?), so it would seem necessary to mention in the LR that in Windows, pictures appear with the same orientation as the camera, but not in Mac. Otherwise users will think it is a bug.

feedback://showreport?report_id=39554

That is nice. But given the current platform inconsistency, you will need to work around the EXIF feature in Windows to make sure you don’t end up rotating more than needed :wink:

This can be of use to read and modify EXIF :
http://www.media.mit.edu/pia/Research/deepview/exif.html

On Windows : https://code.google.com/p/flickfleck/

http://www.leancrew.com/all-this/2009/04/derotating-jpegs-with-exiftool/