#lang scheme/gui (define (remove-alpha filename) (define bm (make-object bitmap% filename 'unknown/mask)) (define bm2 (make-object bitmap% (send bm get-width) (send bm get-height))) (define bdc (make-object bitmap-dc% bm2)) (send bdc clear) (send bdc draw-bitmap bm 0 0 'solid (send the-color-database find-color "black") (send bm get-loaded-mask)) (send bdc set-bitmap #f) (send bm2 save-file filename 'png)) ;(remove-alpha "collatz.png") ;(remove-alpha "check-syntax.png") ;; (remove-alpha "struct-hierarchy.png") this one should not have an alpha channel.