Obtaining a Julia `Image` from Luxor.jl

At the moment I draw an Image with Luxor and load it back into an Image with

using Luxor, Images, FileIO
d = Luxor.Drawing(width, height, "temp.png")
ā€¦
Luxor.finish()
load("temp.png")

Is there a way to get the image back an memory, either as PNG stream or even better as Matrix{RGB{N0f8}}?

Yes! Check out the @imagematrix macro or the image_as_matrix function.

3 Likes

thank you!