Branch: Tag:

2014-01-12

2014-01-12 02:07:06 by Arne Goedeke <el@laramies.com>

Image.phase: fix conversion error

these color values are in 0..255, so use unsigned char instead of char.

66:    {\    if (abs(V)>abs(H))\    if (V<0)\ -  imgi[i].R=DOUBLE_TO_CHAR(0.5+224+(((float)H)/\ -  (0-V))*32.0);\ +  imgi[i].R=DOUBLE_TO_COLORTYPE(0.5+224+(((float)H)/(0-V))*32.0);\    else\ -  imgi[i].R=DOUBLE_TO_CHAR(0.5+96+(((float)H)/\ -  (V))*32.0);\ +  imgi[i].R=DOUBLE_TO_COLORTYPE(0.5+96+(((float)H)/(V))*32.0);\    else\    if (H<0)\ -  imgi[i].R=DOUBLE_TO_CHAR(0.5+32+(((float)V)/\ -  (0-H))*32.0);\ +  imgi[i].R=DOUBLE_TO_COLORTYPE(0.5+32+(((float)V)/(0-H))*32.0);\    else\ -  imgi[i].R=DOUBLE_TO_CHAR(0.5+160+(((float)V)/\ -  (H))*32.0);\ +  imgi[i].R=DOUBLE_TO_COLORTYPE(0.5+160+(((float)V)/(H))*32.0);\    }\    }\    }