From eb46bd17a6e99b8069b0c2a63382151fad091f26 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Wed, 16 Mar 2016 13:44:17 +0000 Subject: Speed pam writing. --- source/fitz/pixmap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source/fitz/pixmap.c') diff --git a/source/fitz/pixmap.c b/source/fitz/pixmap.c index 37258b1a..a7d26b17 100644 --- a/source/fitz/pixmap.c +++ b/source/fitz/pixmap.c @@ -691,7 +691,7 @@ fz_write_pam_header(fz_context *ctx, fz_output *out, int w, int h, int n, int sa void fz_write_pam_band(fz_context *ctx, fz_output *out, int w, int h, int n, int band, int bandheight, unsigned char *sp, int savealpha) { - int y, x, k; + int y, x; int start = band * bandheight; int end = start + bandheight; int sn = n; @@ -708,8 +708,7 @@ fz_write_pam_band(fz_context *ctx, fz_output *out, int w, int h, int n, int band x = w; while (x--) { - for (k = 0; k < dn; k++) - fz_putc(ctx, out, sp[k]); + fz_write(ctx, out, sp, dn); sp += sn; } } -- cgit v1.2.3