diff options
author | Robin Watts <robin.watts@artifex.com> | 2016-03-16 13:44:17 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2016-03-16 15:39:52 +0000 |
commit | eb46bd17a6e99b8069b0c2a63382151fad091f26 (patch) | |
tree | ca05b2f5c573437b89809ea8026b89e300bf6cd0 /source/fitz | |
parent | eb6b1208825d949178f4a2b5a1a5c4f38a20110a (diff) | |
download | mupdf-eb46bd17a6e99b8069b0c2a63382151fad091f26.tar.xz |
Speed pam writing.
Diffstat (limited to 'source/fitz')
-rw-r--r-- | source/fitz/pixmap.c | 5 |
1 files changed, 2 insertions, 3 deletions
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; } } |