getpixel(3alleg4) Allegro manual getpixel(3alleg4)NAME
getpixel - Reads a pixel from a bitmap. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
int getpixel(BITMAP *bmp, int x, int y);
DESCRIPTION
Reads a pixel from point (x, y) in the bitmap.
RETURN VALUE
Returns -1 if the point lies outside the bitmap (ignoring the clipping rectangle), otherwise the value of the pixel in the color format of
the bitmap.
Warning: -1 is also a valid value for pixels contained in 32-bit bitmaps with alpha channel (when R,G,B,A are all equal to 255) so you
can't use the test against -1 as a predicate for such bitmaps. In this cases, the only reliable predicate is is_inside_bitmap().
To extract the individual color components, use the getr() / getg() / getb() / geta() family of functions.
SEE ALSO putpixel(3alleg4), _getpixel(3alleg4), is_inside_bitmap(3alleg4), getr(3alleg4), getg(3alleg4), getb(3alleg4), geta(3alleg4),
ex12bit(3alleg4), exalpha(3alleg4), exflame(3alleg4), exlights(3alleg4)Allegro version 4.4.2 getpixel(3alleg4)
Hi all
For my Radio-astronomy project, I`d like to read from the parallel port. Signals are coming from a 8bit analog/digital converter over the parallelport.
I`d like to read the signal (endless) and print them out on the screen. I mean in a diagramm, with 2 axis. (Time,sec. and Voltage, V... (1 Reply)
My goal is to open a window in the X-server and plot a series of pixels. However, I find many examples I have tried to draw to a window fail and the window remains blank. Therefore, I am here requesting information. I do not know c, and am a beginner. Currently, I am using a mix-match of code,... (1 Reply)
Is this x86? I encountered this instruction and can't seem to find any info on what it does anywhere. Any ideas? This is how it appears:
seg es (4 Replies)
I need to rotate a pixmap in XLib with some kind of interpolation to reduce the aliasing.
I came up with the following code, which uses bilinear interpolation. It works fine: the rotated image looks perfect, but unfortunately it takes 5 or 6 seconds for each rotation. (in a 300x300, 16 colours... (5 Replies)