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

Images are not displayed #292

Closed
mwisnicki opened this issue Jul 3, 2021 · 2 comments
Closed

Images are not displayed #292

mwisnicki opened this issue Jul 3, 2021 · 2 comments

Comments

@mwisnicki
Copy link

val img = ImageIO.read(java.net.URL("https://upload.wikimedia.org/wikipedia/commons/thumb/1/1a/JetBrains_Logo_2016.svg/222px-JetBrains_Logo_2016.svg.png"))
DISPLAY(img)

Results in calling toString rather than displaying image inline.

BufferedImage@5dffdd4b: type = 6 ColorModel: #pixelBits = 32 numComponents = 4 color space = java.awt.color.ICC_ColorSpace@a197725 transparency = 3 has alpha = true isAlphaPre = false ByteInterleavedRaster: width = 222 height = 240 #numDataElements 4 dataOff[0] = 3
@mwisnicki
Copy link
Author

Also it's very annoying MIME only takes String rather than Buffer or byte[].

@mwisnicki
Copy link
Author

I've found this by searching the code (should be easier to discover such things)

%use lib-ext
Image(img)

But IMHO DISPLAY should work for basic built in types out of the box.

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

1 participant