summaryrefslogtreecommitdiff
path: root/render/pixmap.c
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2004-11-16 08:58:17 +0100
committerTor Andersson <tor@ghostscript.com>2004-11-16 08:58:17 +0100
commit3b425b8bf0c58e25da576ed86496171ea19240f9 (patch)
tree37d6feb715dd929392fb16fdde6cf994dfbc1397 /render/pixmap.c
parent49132f70ac40b2dc7b9a0e22b33a3964af687874 (diff)
downloadmupdf-3b425b8bf0c58e25da576ed86496171ea19240f9.tar.xz
removed c99-isms. improved bbox handling.
Diffstat (limited to 'render/pixmap.c')
-rw-r--r--render/pixmap.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/render/pixmap.c b/render/pixmap.c
index 9bbe297b..396b8784 100644
--- a/render/pixmap.c
+++ b/render/pixmap.c
@@ -146,16 +146,14 @@ fz_blendmask(fz_pixmap *dst, fz_pixmap *src, fz_pixmap *msk)
void
fz_gammapixmap(fz_pixmap *pix, float gamma)
{
- int i;
unsigned char table[255];
- for (i = 0; i < 256; i++)
- table[i] = CLAMP(pow(i / 255.0, gamma) * 255.0, 0, 255);
int n = pix->w * pix->h * pix->n;
unsigned char *p = pix->samples;
+ int i;
+ for (i = 0; i < 256; i++)
+ table[i] = CLAMP(pow(i / 255.0, gamma) * 255.0, 0, 255);
while (n--)
- {
*p = table[*p]; p++;
- }
}
void
@@ -180,9 +178,6 @@ fz_debugpixmap(fz_pixmap *pix)
putc(r, ppm);
putc(g, ppm);
putc(b, ppm);
- // putc(((r * a) / 255) + (255 - a), ppm);
- // putc(((g * a) / 255) + (255 - a), ppm);
- // putc(((b * a) / 255) + (255 - a), ppm);
}
fclose(ppm);
fclose(pgm);