get_row_colr.c File Reference

#include <grass/gis.h>
#include "G.h"

Include dependency graph for get_row_colr.c:

Go to the source code of this file.

Functions

int G_get_raster_row_colors (int fd, int row, struct Colors *colors, unsigned char *red, unsigned char *grn, unsigned char *blu, unsigned char *nul)
 Reads a row of raster data and converts it to red, green and blue components according to the colors parameter. This provides a convenient way to treat a raster layer as a color image without having to explictly cater for each of CELL, FCELL and DCELL types.


Function Documentation

int G_get_raster_row_colors ( int  fd,
int  row,
struct Colors *  colors,
unsigned char *  red,
unsigned char *  grn,
unsigned char *  blu,
unsigned char *  nul 
)

Reads a row of raster data and converts it to red, green and blue components according to the colors parameter. This provides a convenient way to treat a raster layer as a color image without having to explictly cater for each of CELL, FCELL and DCELL types.

Parameters:
fd 
row 
colors 
red 
grn 
blu 
nul 
Returns:
int

Definition at line 24 of file get_row_colr.c.

References G_get_raster_row(), G_incr_void_ptr(), G_is_null_value(), G_lookup_raster_colors(), G_raster_size(), and G_realloc().


Generated on Sun Apr 6 17:32:20 2008 for GRASS by  doxygen 1.5.5