
@ankush.thakur53 has joined the channel

I’m trying to figure out how to manipulate icons in the icon library to create bitmaps for buttons in the stepper. It appears that the icons in the library are bitmap%’s, and the easy way to combine them is with 2htdp/image, but the result is an image, not a bitmap%, even after using freeze
, making it unusable with e.g. compiled-bitmap
. I can pursue one of two strategies at this point: digging into the 2htdp code to see how to extract a bitmap% from a frozen image, or trying to figure out how to composite bitmap%’s using only gui library functions. Any advice?

Can you use pict
instead of 2htdp/image
?

ooh! I’ll try that. Many thanks!

hmm… actually, pict seems further from bitmap% than image, I can’t even hc-append two bitmaps, and they don’t seem to be “pict-convertible”. Hm.

In a pinch you can save both 2htdp/image and picts to a file and then load them as bitmaps.

There is a pict->bitmap
in pict
.

And bitmap
produces a pict from a bitmap%
.

There’s an example at the top of images/icons
that combines icons: https://docs.racket-lang.org/images/Icons.html#(part._.About_.These_.Icons)

Excellent! Okay, looks like going through “pict” is the way to go. Many thanks to both of you.

wait… just saw Neil Toronto’s “flomap” module; might be even better.

oof. no, just kidding.

@diegorj100 has joined the channel