diff options
author | Robin Watts <robin.watts@artifex.com> | 2016-06-16 00:14:47 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2016-06-17 13:24:49 +0100 |
commit | f653eac3bac807f13ecba3e8463c4de3689da090 (patch) | |
tree | 835ddb55b0a23b48537fbcce8938454ad83201b6 /source/fitz/output-png.c | |
parent | 77b12405b60253f46cddcb99c4e31fd73fbac56e (diff) | |
download | mupdf-f653eac3bac807f13ecba3e8463c4de3689da090.tar.xz |
Improve banding API.
Previously the API assumed that all bands had to be the same
height. By moving the multiplication into the caller, we can
lift that assumption.
Diffstat (limited to 'source/fitz/output-png.c')
-rw-r--r-- | source/fitz/output-png.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/fitz/output-png.c b/source/fitz/output-png.c index 74f2ca3f..00eaeee8 100644 --- a/source/fitz/output-png.c +++ b/source/fitz/output-png.c @@ -130,7 +130,7 @@ fz_write_png_header(fz_context *ctx, fz_output *out, int w, int h, int n, int al } void -fz_write_png_band(fz_context *ctx, fz_output *out, fz_png_output_context *poc, int stride, int band, int bandheight, unsigned char *sp) +fz_write_png_band(fz_context *ctx, fz_output *out, fz_png_output_context *poc, int stride, int band_start, int bandheight, unsigned char *sp) { unsigned char *dp; int y, x, k, err, finalband; @@ -144,10 +144,9 @@ fz_write_png_band(fz_context *ctx, fz_output *out, fz_png_output_context *poc, i n = poc->n; alpha = poc->alpha; - band *= bandheight; - finalband = (band+bandheight >= h); + finalband = (band_start+bandheight >= h); if (finalband) - bandheight = h - band; + bandheight = h - band_start; if (poc->udata == NULL) { |