[GRASS-SVN] r39399 - grass/branches/develbranch_6/imagery/i.rgb.his
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Oct 5 02:33:12 EDT 2009
Author: hamish
Date: 2009-10-05 02:33:11 -0400 (Mon, 05 Oct 2009)
New Revision: 39399
Modified:
grass/branches/develbranch_6/imagery/i.rgb.his/closefiles.c
Log:
write metadata
Modified: grass/branches/develbranch_6/imagery/i.rgb.his/closefiles.c
===================================================================
--- grass/branches/develbranch_6/imagery/i.rgb.his/closefiles.c 2009-10-05 02:13:58 UTC (rev 39398)
+++ grass/branches/develbranch_6/imagery/i.rgb.his/closefiles.c 2009-10-05 06:33:11 UTC (rev 39399)
@@ -12,6 +12,7 @@
int i;
struct Colors colors;
struct Range range;
+ struct History history;
CELL min, max;
char *mapset;
@@ -22,6 +23,8 @@
mapset = G_mapset();
+ /* write colors */
+ /* set to 0,max_level instead of min,max ?? */
G_read_range(h_name, mapset, &range);
G_get_range_min_max(&range, &min, &max);
G_make_grey_scale_colors(&colors, min, max);
@@ -37,5 +40,22 @@
G_make_grey_scale_colors(&colors, min, max);
G_write_colors(s_name, mapset, &colors);
+ /* write metadata */
+ G_short_history(h_name, "raster", &history);
+ G_command_history(&history);
+ G_write_history(h_name, &history);
+ G_put_cell_title(h_name, "Image hue");
+
+ G_short_history(i_name, "raster", &history);
+ G_command_history(&history);
+ G_write_history(i_name, &history);
+ G_put_cell_title(i_name, "Image intensity");
+
+ G_short_history(s_name, "raster", &history);
+ G_command_history(&history);
+ G_write_history(s_name, &history);
+ G_put_cell_title(s_name, "Image saturation");
+
return 0;
}
+
More information about the grass-commit
mailing list