user3665066
user3665066

Reputation: 23

Racket saves image variable as image to disk

In racket, I can define an image variable like this:

(define a [img])

But would it be possible to store this image to disk? I know that I insert the image from my disk, but I am wondering would it be possible to store it back to disk in program.

Upvotes: 2

Views: 620

Answers (1)

soegaard
soegaard

Reputation: 31145

Yes, you can use save-image:

http://docs.racket-lang.org/teachpack/2htdpimage.html?q=save-image#%28def._%28%28lib._2htdp%2Fimage..rkt%29._save-image%29%29

(save-image a "image of arrow.png")

Upvotes: 3

Related Questions