GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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 explicitly cater for each of CELL, FCELL and DCELL types. More...
 

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 explicitly 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 dialogs::cols, fd, G__::fileinfo, G_get_raster_row(), G_incr_void_ptr(), G_is_null_value(), G_lookup_raster_colors(), G_raster_size(), fileinfo::map_type, main::set, tools::size, dialogs::type, and G__::window.