~ubuntu-branches/ubuntu/precise/grass/precise

« back to all changes in this revision

Viewing changes to imagery/i.his.rgb/his2rgb.c

  • Committer: Bazaar Package Importer
  • Author(s): Francesco Paolo Lovergine
  • Date: 2011-04-13 17:08:41 UTC
  • mfrom: (8.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20110413170841-ss1t9bic0d0uq0gz
Tags: 6.4.1-1
* New upstream version.
* Now build-dep on libjpeg-dev and current libreadline6-dev.
* Removed patch swig: obsolete.
* Policy bumped to 3.9.2, without changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
#include <grass/gis.h>
20
20
#include "globals.h"
21
21
 
22
 
void his2rgb(CELL * rowbuffer[3], int columns)
 
22
void his2rgb(CELL *rowbuffer[3], int columns)
23
23
{
24
24
    long sample;                /* sample indicator                          */
25
25
    double red;                 /* the red band output                       */
121
121
        else
122
122
            blue = blue255;
123
123
 
124
 
        if (red > 254.5)
125
 
            red = 254.5;
 
124
        if (red > 255. - 0.5)
 
125
            red = 255. - 0.5;
126
126
        if (red < 0.0)
127
127
            red = 0.0;
128
 
        if (green > 254.5)
129
 
            green = 254.5;
 
128
        if (green > 255. - 0.5)
 
129
            green = 255. - 0.5;
130
130
        if (green < 0.0)
131
131
            green = 0.0;
132
 
        if (blue > 254.5)
133
 
            blue = 254.5;
 
132
        if (blue > 255. - 0.5)
 
133
            blue = 255. - 0.5;
134
134
        if (blue < 0.0)
135
135
            blue = 0.0;
136
136