From e5c44713381522afde3ef6647bf1e0ce406d6a38 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Tue, 23 Aug 2011 07:11:39 -0500 Subject: [PATCH] add test cases for old file 2htdp/image file formats (and fix corresponding bugs) original commit: 034e4f236486d5b246e3384bbce549c7d595c7fb --- collects/mrlib/image-core.rkt | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/collects/mrlib/image-core.rkt b/collects/mrlib/image-core.rkt index b306fe27..27686daa 100644 --- a/collects/mrlib/image-core.rkt +++ b/collects/mrlib/image-core.rkt @@ -452,12 +452,11 @@ has been moved out). (= arg-count 7)) ;; we changed the arity of the bitmap constructor from old versions, ;; so fix it up here. - (make-bitmap (list-ref parsed-args 0) - (list-ref parsed-args 1) - (list-ref parsed-args 2) - (list-ref parsed-args 3) - (list-ref parsed-args 4) - (make-hash))] + (make-ibitmap (list-ref parsed-args 0) + (list-ref parsed-args 2) + (list-ref parsed-args 3) + (list-ref parsed-args 4) + (make-hash))] [(and (eq? tag 'struct:bitmap) (= arg-count 6)) ;; we changed the arity of the bitmap constructor from old versions, @@ -466,11 +465,11 @@ has been moved out). ;; and the mask field was dropped in favor of always having an alpha bitmap in the ;; raw-bitmap field. The bytes that were written out always had the mask ;; factored in, tho (which led to a bug) so we can just ignore the mask here - (make-bitmap (list-ref parsed-args 0) - (list-ref parsed-args 2) - (list-ref parsed-args 3) - (list-ref parsed-args 4) - (make-hash))] + (make-ibitmap (list-ref parsed-args 0) + (list-ref parsed-args 2) + (list-ref parsed-args 3) + (list-ref parsed-args 4) + (make-hash))] [(and (eq? tag 'struct:color) (= arg-count 3)) ;; we changed the arity of the color constructor from old versions,