Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spatial order ignored when displayed on OSX #451

Closed
Evizero opened this issue Mar 7, 2016 · 5 comments
Closed

Spatial order ignored when displayed on OSX #451

Evizero opened this issue Mar 7, 2016 · 5 comments

Comments

@Evizero
Copy link
Member

Evizero commented Mar 7, 2016

Not sure what is going on, but I could swear this did not happen a few days ago. Basically I am using permutedims to test if my functions work correctly. However, it seems that either IJulia doesn't display the images correctly anymore, or I am imagining things.

Is the following normal behaviour ? I would have assumed that the images should be displayed upright in both situations, and I could swear this was the case a few days ago:

using Images
using TestImages

img = testimage("lena_color_256")

img1

show(img)
RGB Images.Image with:
  data: 256x256 Array{ColorTypes.RGB{FixedPointNumbers.UFixed{UInt8,8}},2}
  properties:
    imagedescription: <suppressed>
    spatialorder:  x y
    pixelspacing:  1 1
img2 = permutedims(img, [2,1])

img2

show(img2)
RGB Images.Image with:
  data: 256x256 Array{ColorTypes.RGB{FixedPointNumbers.UFixed{UInt8,8}},2}
  properties:
    imagedescription: <suppressed>
    spatialorder:  y x
    pixelspacing:  1 1

Edit: Using viewof ImageView works as I would expect it to (displayed upright in both cases)

Edit: I'm on the currently tagged versions for every package.

@timholy
Copy link
Member

timholy commented Mar 13, 2016

May be because of recent work I did in ImageMagick on EXIF, not sure.

Unfortunately, I didn't get to this before leaving on vacation, and I have a very low bandwidth connection. If this bothers you, take a look at the writemime method in Images and the save(::stream) method in whichever IO package (QuartzImageIO or ImageMagick) you're using.

@Evizero
Copy link
Member Author

Evizero commented May 14, 2016

Now that I am using Tom's VisualRegressionTests this issue surfaced again. Basically on OSX if I do a permutedims(testimg, [2, 1]) the image will be transposed as shown above. This doesn't seem to have anything to do with IJulia, but seems special to something on OSX (probably QuartzImageIO). Travis on OSX gets the same transposed result while while the linux one doesn't

@Evizero Evizero changed the title Spatial order ignored when displayed in IJulia Spatial order ignored when displayed on OSX May 14, 2016
@Evizero
Copy link
Member Author

Evizero commented May 14, 2016

Here probably? https://github.com/JuliaIO/QuartzImageIO.jl/blob/master/src/QuartzImageIO.jl#L258
Unfortunately, I am not quite sure how that code really works there (or rather how it is supposed to work) or I would try to fix it right now. Maybe something like this: https://github.com/JuliaIO/ImageMagick.jl/blob/master/src/ImageMagick.jl#L176 has to happen?

@timholy
Copy link
Member

timholy commented May 14, 2016

Yep, that's gotta be it. Great detective work!

timholy referenced this issue Jan 16, 2017
Not sure why this was commented out originally
@timholy
Copy link
Member

timholy commented Jan 30, 2017

Closed by #577

@timholy timholy closed this as completed Jan 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants