62 const char *mapset =
NULL;
108 for (row = 0; row < rows; row++) {
122 result[i++] = red[
col];
135 for (row = 0; row < rows; row++) {
143 result[i++] = ((red[
col]) * 11 + (
green[
col]) * 16 +
151 result[i++] = ((red[
col]) * 19 + (
green[
col]) * 38 +
void G_free(void *)
Free allocated memory.
const char * G_find_raster2(const char *, const char *)
Find a raster map (look but don't touch)
int Rast_is_null_value(const void *, RASTER_MAP_TYPE)
To check if a raster value is set to NULL.
CELL * Rast_allocate_c_buf(void)
Allocate memory for a CELL type raster map.
DCELL * Rast_allocate_d_buf(void)
Allocates memory for a raster map of type DCELL.
int Rast_read_colors(const char *, const char *, struct Colors *)
Read color table of raster map.
void Rast_close(int)
Close a raster map.
void Rast_lookup_colors(const void *, unsigned char *, unsigned char *, unsigned char *, unsigned char *, int, struct Colors *, RASTER_MAP_TYPE)
Lookup an array of colors.
int Rast_open_old(const char *, const char *)
Open an existing integer raster map (cell)
void Rast_free_colors(struct Colors *)
Free color structure memory.
FCELL * Rast_allocate_f_buf(void)
Allocates memory for a raster map of type FCELL.
int Rast_window_cols(void)
Number of columns in active window.
int Rast_window_rows(void)
Number of rows in active window.
RASTER_MAP_TYPE Rast_get_map_type(int)
Determine raster type from descriptor.
void Rast_get_row(int, void *, int, RASTER_MAP_TYPE)
Get raster row.
int Rast_map_to_img_str(char *name, int color_mode, unsigned char *result)