瀏覽代碼

* src/bitmap.c:

+ Renamed gammaval into gamma.
    + Fixed Doxygen comments.
tags/v0.99.beta14
Sam Hocevar sam 19 年之前
父節點
當前提交
f42fd33636
共有 1 個檔案被更改,包括 6 行新增6 行删除
  1. +6
    -6
      src/bitmap.c

+ 6
- 6
src/bitmap.c 查看文件

@@ -170,7 +170,7 @@ struct caca_bitmap
int rleft, gleft, bleft, aleft;
void (*get_hsv)(struct caca_bitmap *, char *, int, int);
int red[256], green[256], blue[256], alpha[256];
float gammaval;
float gamma;
int gammatab[4097];
};
#endif
@@ -325,19 +325,19 @@ void caca_set_bitmap_palette(struct caca_bitmap *bitmap,
* Set the gamma of bitmap.
*
* \param bitmap Bitmap object.
* \param red Gamma value.
* \param gamma Gamma value.
*/
void caca_set_bitmap_gamma(struct caca_bitmap *bitmap, float gammaval)
void caca_set_bitmap_gamma(struct caca_bitmap *bitmap, float gamma)
{
int i;

if(gammaval <= 0.0)
if(gamma <= 0.0)
return;

bitmap->gammaval = gammaval;
bitmap->gamma = gamma;

for(i = 0; i < 4096; i++)
bitmap->gammatab[i] = 4096.0 * caca_powf((float)i / 4096.0, 1.0 / gammaval);
bitmap->gammatab[i] = 4096.0 * caca_powf((float)i / 4096.0, 1.0 / gamma);
}

/**


Loading…
取消
儲存