GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  GETPIXEL (3)

NAME

getpixel - Reads a pixel from a bitmap. Allegro game programming library.

CONTENTS

Synopsis
Description
See Also

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(3), _getpixel(3), is_inside_bitmap(3), getr(3), getg(3), getb(3), geta(3), ex12bit(3), exalpha(3), exflame(3), exlights(3)
Search for    or go to Top of page |  Section 3 |  Main Index


Allegro GETPIXEL (3) version 4.4.2

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.