diff options
Diffstat (limited to 'fitzdraw/imagescale.c')
-rw-r--r-- | fitzdraw/imagescale.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/fitzdraw/imagescale.c b/fitzdraw/imagescale.c index 147e31af..ad73ece1 100644 --- a/fitzdraw/imagescale.c +++ b/fitzdraw/imagescale.c @@ -228,9 +228,11 @@ fz_scalepixmaptile(fz_pixmap *dst, int xoffs, int yoffs, fz_pixmap *src, int xde for (y = 0, oy = 0; y < (src->h / ydenom) * ydenom; y += ydenom, oy++) { for (iy = 0; iy < ydenom; iy++) + { srowx(src->samples + (y + iy) * src->w * n, buf + iy * ow * n, src->w, xdenom); + } scolx(buf, dstsamples + oy * dst->w * n, ow, ydenom); } @@ -238,9 +240,11 @@ fz_scalepixmaptile(fz_pixmap *dst, int xoffs, int yoffs, fz_pixmap *src, int xde if (remaining) { for (iy = 0; iy < remaining; iy++) + { srowx(src->samples + (y + iy) * src->w * n, buf + iy * ow * n, src->w, xdenom); + } scolx(buf, dstsamples + oy * dst->w * n, ow, remaining); } } @@ -250,9 +254,11 @@ fz_scalepixmaptile(fz_pixmap *dst, int xoffs, int yoffs, fz_pixmap *src, int xde for (y = 0, oy = 0; y < (src->h / ydenom) * ydenom; y += ydenom, oy++) { for (iy = 0; iy < ydenom; iy++) + { fz_srown(src->samples + (y + iy) * src->w * n, buf + iy * ow * n, src->w, xdenom, n); + } fz_scoln(buf, dstsamples + oy * dst->w * n, ow, ydenom, n); } @@ -260,10 +266,11 @@ fz_scalepixmaptile(fz_pixmap *dst, int xoffs, int yoffs, fz_pixmap *src, int xde if (remaining) { for (iy = 0; iy < remaining; iy++) + { fz_srown(src->samples + (y + iy) * src->w * n, buf + iy * ow * n, src->w, xdenom, n); - + } fz_scoln(buf, dstsamples + oy * dst->w * n, ow, remaining, n); } } @@ -313,9 +320,11 @@ fz_scalepixmap(fz_pixmap **dstp, fz_pixmap *src, int xdenom, int ydenom) for (y = 0, oy = 0; y < (src->h / ydenom) * ydenom; y += ydenom, oy++) { for (iy = 0; iy < ydenom; iy++) + { srowx(src->samples + (y + iy) * src->w * n, buf + iy * ow * n, src->w, xdenom); + } scolx(buf, dst->samples + oy * dst->w * n, dst->w, ydenom); } @@ -323,9 +332,11 @@ fz_scalepixmap(fz_pixmap **dstp, fz_pixmap *src, int xdenom, int ydenom) if (remaining) { for (iy = 0; iy < remaining; iy++) + { srowx(src->samples + (y + iy) * src->w * n, buf + iy * ow * n, src->w, xdenom); + } scolx(buf, dst->samples + oy * dst->w * n, dst->w, remaining); } } @@ -335,9 +346,11 @@ fz_scalepixmap(fz_pixmap **dstp, fz_pixmap *src, int xdenom, int ydenom) for (y = 0, oy = 0; y < (src->h / ydenom) * ydenom; y += ydenom, oy++) { for (iy = 0; iy < ydenom; iy++) + { fz_srown(src->samples + (y + iy) * src->w * n, buf + iy * ow * n, src->w, xdenom, n); + } fz_scoln(buf, dst->samples + oy * dst->w * n, dst->w, ydenom, n); } @@ -345,9 +358,11 @@ fz_scalepixmap(fz_pixmap **dstp, fz_pixmap *src, int xdenom, int ydenom) if (remaining) { for (iy = 0; iy < remaining; iy++) + { fz_srown(src->samples + (y + iy) * src->w * n, buf + iy * ow * n, src->w, xdenom, n); + } fz_scoln(buf, dst->samples + oy * dst->w * n, dst->w, remaining, n); } } |