Functions

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__::fileinfo, G_get_raster_row(), G_incr_void_ptr(), G_is_null_value(), G_lookup_raster_colors(), G_raster_size(), fileinfo::map_type, and G__::window.