[plt-scheme] How to get individual pixel in a bitmap image

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Thu Nov 30 07:05:41 EST 2006

At Thu, 30 Nov 2006 10:28:27 +0100, "jf grunt" wrote:
> I wonder how to access ti pixel in a bitmap image. I took a look at the
> official documentation but when i emplement a bitmap% object and use the
> "get-argb-pixels" it says me that the method is not known in this specific
> object. How can i do???

In v360,
  (send (make-object bitmap% 1 1) get-argb-pixels 0 0 1 1 (make-bytes 4))
works for me.

Are you using version 360 of PLT Scheme, or an earlier version? I ask
in case you read the v360 documentation but you're using an earlier
version; the `get-argb-pixels' method is relatively new in bitmap%.

In all versions, you can select the bitmap into a bitmap-dc%, and then
use the `get-pixel' or `get-argb-pixels' method of bitmap-dc%.


Posted on the users mailing list.