[plt-scheme] Image library bug?

From: Jordan Johnson (jmj at fellowhuman.com)
Date: Mon Dec 7 19:32:04 EST 2009

Thanks, Robby.

If the color-lists will be reimplemented in 2htdp/image, I wouldn't  
terribly mind the change simply being to the old library's docs.  I  
see there isn't an equivalent of the image<->color-list functions in  
the new library; is that likely to make its way in eventually?  If  
not, it would be nice to have a way to make this work in the old  
version.

BTW, since it's related: it has bugged me for a while that the shape  
primitives (rectangle, circle, etc.) accept color structs but not  
alpha-colors.  If there are plans to support color structs in the 2e  
version, it'd be Really Neat if both kinds could work, or if alpha- 
colors were the only kind of color struct (perhaps with a constructor  
like make-color that creates a fully-opaque color).

Thanks again.

Best,
Jordan


On Dec 7, 2009, at 2:34 PM, Robby Findler  
<robby at eecs.northwestern.edu> wrote:

> Somewhere along the way, apparently it was decided that white pixels
> in color-list->image were actually transparent, not white. I'm not
> sure why that is the case, but that's why the below are not the same.
>
> This is not documented, and I'm not sure if it shoudl be documented or
> changed. I lean towards changing the documentation since htdp/image
> has been in use for a long time, but does anyone remember or have
> opinions one way or the other?
>
> Robby
>
> On Mon, Dec 7, 2009 at 4:20 PM, Jordan Johnson <jmj at fellowhuman.com>  
> wrote:
>> Hi all,
>>>
>>
>> The following (which I hope hasn't been too badly mangled by my  
>> iPod mailer)
>> evaluates to false:
>>
>>> (image=? (color-list->image (build-list 9 (lambda (i) (make-color  
>>> 255 255
>>> 255)))
>>>                              3 3 1 1)
>>>         (rectangle 3 3 "solid" (make-color 255 255 255)))
>>
>> Manual testing verifies that the dimensions and pinhole location  
>> are equal,
>> as are the lists produced from these images via image->color-list.
>>
>> Any ideas?
>>
>> Best,
>> Jordan
>>
>> _________________________________________________
>>  For list-related administrative tasks:
>>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>>


Posted on the users mailing list.