25 unsigned char *red,
unsigned char *grn,
26 unsigned char *blu,
unsigned char *nul)
29 static int array_size;
30 static unsigned char *
set;
39 if (array_size < cols * size) {
40 array_size = cols *
size;
41 array = (DCELL *) G_realloc(array, array_size);
44 if (set_size < cols) {
46 set = G_realloc(set, set_size);
int G_lookup_raster_colors(const void *raster, unsigned char *red, unsigned char *grn, unsigned char *blu, unsigned char *set, int n, struct Colors *colors, RASTER_MAP_TYPE map_type)
If the cell_type is CELL_TYPE, calls G_lookup_colors((CELL *)cell, r, g, b, set, n, colors); If the cell_type is FCELL_TYPE, calls G_lookup_f_raster_colors(FCELL *)cell, r, g, b, set, n, colors); If the cell_type is DCELL_TYPE, calls G_lookup_d_raster_colors(DCELL *)cell, r, g, b, set, n, colors);.
int G_get_raster_row(int fd, void *buf, int row, RASTER_MAP_TYPE data_type)
Get raster row.
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 ...
void * G_incr_void_ptr(const void *ptr, const size_t size)
Advance void pointer.
size_t G_raster_size(RASTER_MAP_TYPE data_type)
Returns size of a raster CELL in bytes.
struct fileinfo * fileinfo
int G_is_null_value(const void *rast, RASTER_MAP_TYPE data_type)
If the data_type is CELL_TYPE, calls G_is_c_null_value ((CELL *) rast); If the data_type is FCELL_TYP...