[GRASS-SVN] r72504 - in sandbox/alexandris: i.his.rgb i.rgb.his
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Mar 22 11:15:32 PDT 2018
Author: nikosa
Date: 2018-03-22 11:15:32 -0700 (Thu, 22 Mar 2018)
New Revision: 72504
Modified:
sandbox/alexandris/i.his.rgb/openfiles.c
sandbox/alexandris/i.rgb.his/closefiles.c
Log:
i.[rgb|hsl].[hsl|rgb] (sandbox): use of Rast_open_new, double, add Rast_write_units(hue, degrees)
Modified: sandbox/alexandris/i.his.rgb/openfiles.c
===================================================================
--- sandbox/alexandris/i.his.rgb/openfiles.c 2018-03-22 17:43:59 UTC (rev 72503)
+++ sandbox/alexandris/i.his.rgb/openfiles.c 2018-03-22 18:15:32 UTC (rev 72504)
@@ -16,9 +16,9 @@
DCELL * rowbuf[3])
{
/* open output files */
- fd_output[0] = Rast_open_fp_new(red);
- fd_output[1] = Rast_open_fp_new(green);
- fd_output[2] = Rast_open_fp_new(blue);
+ fd_output[0] = Rast_open_new(red, DCELL_TYPE);
+ fd_output[1] = Rast_open_new(green, DCELL_TYPE);
+ fd_output[2] = Rast_open_new(blue, DCELL_TYPE);
/* allocate the cell row buffer */
rowbuf[0] = Rast_allocate_d_buf();
Modified: sandbox/alexandris/i.rgb.his/closefiles.c
===================================================================
--- sandbox/alexandris/i.rgb.his/closefiles.c 2018-03-22 17:43:59 UTC (rev 72503)
+++ sandbox/alexandris/i.rgb.his/closefiles.c 2018-03-22 18:15:32 UTC (rev 72504)
@@ -16,9 +16,11 @@
struct Colors colors;
struct FPRange range;
struct History history;
- DCELL min, max;
+ double min;
+ double max;
const char *mapset;
+ /* free allocated memory, close raster maps */
for (property = 0; property < 3; property++)
{
Rast_close(fd_output[property]);
@@ -48,6 +50,7 @@
Rast_command_history(&history);
Rast_write_history(hue, &history);
Rast_put_cell_title(hue, "Image hue");
+ Rast_write_units(hue, "degrees");
Rast_short_history(intensity, "raster", &history);
Rast_command_history(&history);
More information about the grass-commit
mailing list