Changeset 2602
- Timestamp:
- 07/29/08 01:01:17 (5 years ago)
- File:
-
- 1 edited
-
libpipi/trunk/pipi/pixels.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
libpipi/trunk/pipi/pixels.c
r2260 r2602 50 50 uint8_t *pixel; 51 51 52 if(x < 0 || y < 0 || x >= img->width || y >= img->height)53 {54 *r = *g = *b = 1.; 55 return -1;56 }52 if(x < 0) x = 0; 53 else if(x >= img->width) x = img->width - 1; 54 55 if(y < 0) y = 0; 56 else if(y >= img->height) y = img->height - 1; 57 57 58 58 pixel = img->pixels + y * img->pitch + x * img->channels;
Note: See TracChangeset
for help on using the changeset viewer.
