get-argb-pixels in bitmap-dc%
Gets a rectangle of pixels in the bitmap, subject to the same
rules and performance characteristics of
get-pixel, except that the block get is likely to be faster than the
sequence of individual gets.
The bitmap% class provides this method directly, so it is
not necessary to select a bitmap into a DC to extracts its pixel
values.
(-> voidsenda-bitmap-dcget-argb-pixelsxywidthheightpixelsalpha?)
x: real number
y: real number
width: exact integer in [1, 10000]
height: exact integer in [1, 10000]
pixels: mutable byte string
alpha?=: boolean#fThe pixel RGB values are copied into
pixels. The first byte represents an alpha value of the pixel at (x,y), the second byte represents a red value of the pixel at (x,y), the third byte is the blue value, etc. In this way, the firstwidth*height*4 bytes ofpixelsare set to reflect the current pixel values in the DC. The pixels are in row-major order, left to right then top to bottom.If
alpha?is false, then the alpha value for each pixel is set to 255. Ifalpha?is true, then only the alpha value is set for each pixel, based on each pixel's value. Thus, the samepixelsbyte string is in general filled from two bitmaps: one (the main image) for the pixel values and one (the mask) for the alpha values.