-
Notifications
You must be signed in to change notification settings - Fork 143
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
Random artifacts in image display with IJulia #925
Comments
I'm not sure how IJulia manages the display, but it might be worth |
Thanks for the suggestion. I think I had done that at one point, but did it again anyway. After restarting the notebook, the artifacts remain. I think image display is mediated by ImageMagick.jl, because when I removed that Julia package using |
Do you know what format it uses? ImageIO is better for PNG than ImageMagick, and your issue seems similar to JuliaIO/ImageMagick.jl#184. Perhaps it's using a format not supported by ImageIO and the error is not specific to PNGs. |
The same problem can be reproduced in vscode, too. If I understand it correctly, the image show pipeline is: Colorant array ---> Base64 encoding --> PNG encoding --> atom/vscode/Jupyter/Pluto --> HTML rendering(Base64 decoding + PNG decoding) ImageIO does not yet support IO stream well: JuliaIO/PNGFiles.jl#22 so If we look at the following two results, it seems that
|
closed by JuliaIO/PNGFiles.jl#27 and JuliaIO/ImageIO.jl#15 As a side note: ImageMagick is still problematic here, I don't know where the issue is. For image display purposes, since ImageShow will pass all the work to PNGFiles(it has a higher priority than ImageMagick), so ImageMagick will never be called in this case. |
I sometimes get display artifacts when I display images using IJulia, and it appears to depend on the contents of the image. The simplest example of this that I've found is a 2 pixel image, a 2x1 Float64 array [.40196 0], which should display as adjacent gray and black blocks, but instead the two blocks appear to get crushed to the left and some random vertical lines display on the right.
Code:
Screen capture (Julia 1.5.2, in Debian running inside WSL2 under Windows 10, displayed on Firefox on the Windows side; the same issue appears using Edge browser, or running everything on Mac OS High Sierra with Firefox):
The first two instances of this image will have different such artifacts (confirming their randomness), while the last image, where the 0.40196 is very slightly increased to 0.40197, displays correctly.
The text was updated successfully, but these errors were encountered: