[racket] Is there any way to get the bit depth of a bitmap?

From: rrandom (emanonhere at gmail.com)
Date: Mon Sep 29 21:52:17 EDT 2014

sorry, I do not understand, Does that mean I must set the bit depth of a 
bitmap manually?


于 2014/9/29 23:24, Matthew Flatt 写道:
> Racket libraries can read and write images of various formats and
> pixels depths, but a `bitmap%` object always represents an image using
> 1 or 32 bits per pixel in memory.
>
> At Mon, 29 Sep 2014 23:14:43 +0800, rrandom wrote:
>> Hi,I am recently working in the book Digital Image Processing with
>> racket. I want to know is there any way to get the bit depth or color
>> depth of a input bitmap in Racket? I found the get-depth method in
>> racket/draw,bitmap%, but it only return 1 and 32, that's not what i
>> really want.I input a bitmap whose bit depth is 8 but i got 32.
>> following is the code:
>>
>>> (send (read-bitmap "Fig0305(a)(DFT_no_log).tif")
>> get-depth)
>> 32
>>
>> Is there anything I am wrong? Thank you!
>> ____________________
>>    Racket Users list:
>>    http://lists.racket-lang.org/users


Posted on the users mailing list.