Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

_getpixel(3alleg4) [opendarwin man page]

_getpixel(3alleg4)						  Allegro manual						_getpixel(3alleg4)

NAME
_getpixel, _getpixel15, _getpixel16, _getpixel24, _getpixel32 - Faster specific version of getpixel(). Allegro game programming library. SYNOPSIS
#include <allegro.h> int _getpixel(BITMAP *bmp, int x, int y); int _getpixel15(BITMAP *bmp, int x, int y); int _getpixel16(BITMAP *bmp, int x, int y); int _getpixel24(BITMAP *bmp, int x, int y); int _getpixel32(BITMAP *bmp, int x, int y); DESCRIPTION
Faster inline versions of getpixel() for specific color depths. These won't work in mode-X, and don't do any clipping, so you must make sure the point lies inside the bitmap. RETURN VALUE
Returns the value of the pixel in the color format you specified. SEE ALSO
getpixel(3alleg4) Allegro version 4.4.2 _getpixel(3alleg4)

Check Out this Related Man Page

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)
Man Page

4 More Discussions You Might Find Interesting

1. Programming

Xlib - Mapping Pixel Values to RGB Colors

Hi everyone... I'm working with XLib and I want to find out the pixel value of a particular point on screen and then map it to RGB values. I used XGetImage and XGetPixel to get the pixel value, but how do I get the RGB values of the pixel? I went through a few XLib manuals, there seems to be no... (1 Reply)
Discussion started by: thebin
1 Replies

2. Programming

Converting XImage to PNG

i was able to make a connection to X server and get a screen shot using XGetImage, now, im unable to save this XImage to any good format like PNG, i found a code that saves it to bitmap, but the resulted bitmap file is massive, is there anyway i can save this XImage to PNG directly? thanks; (7 Replies)
Discussion started by: JonhyM
7 Replies

3. Programming

SDL Image Filtering

Solved thanks for info!! (8 Replies)
Discussion started by: aLHaNz
8 Replies

4. Programming

Xlib - Rotation and interpolation of pixmap - Performance problems

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)
Discussion started by: mghis
5 Replies