From 0dc71e9405f3ca45fe40620322743bef0bd86965 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Mon, 24 Jan 2011 16:18:33 -0600 Subject: [PATCH] improve the bitmap function in 2htdp/image related to PR 11362 --- collects/2htdp/private/image-more.rkt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/collects/2htdp/private/image-more.rkt b/collects/2htdp/private/image-more.rkt index 9a3c5c61a2..b7cd9fac35 100644 --- a/collects/2htdp/private/image-more.rkt +++ b/collects/2htdp/private/image-more.rkt @@ -67,9 +67,8 @@ filename [width (if (image? image) (image-width image) 0)] [height (if (image? image) (image-height image) 0)]) - (let* ([bm (make-object bitmap% - (inexact->exact (ceiling width)) - (inexact->exact (ceiling height)))] + (let* ([bm (make-bitmap (inexact->exact (ceiling width)) + (inexact->exact (ceiling height)))] [bdc (make-object bitmap-dc% bm)]) (send bdc set-smoothing 'aligned) (send bdc erase) @@ -77,7 +76,6 @@ (send bdc set-bitmap #f) (send bm save-file filename 'png))) - (define (get-right img) (bb-right (send img get-bb))) (define (get-bottom img) (bb-bottom (send img get-bb))) (define (get-baseline img) (bb-baseline (send img get-bb)))