diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2011-04-06 20:36:09 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2011-04-06 20:36:09 +0200 |
commit | 71b44f14fd09fe3cb404f6f9225b3e4987328e15 (patch) | |
tree | e96d368b12513abc40f34f3534a9266125f651b5 /fitz/res_halftone.c | |
parent | 4a8af0a2b86fcb737cb7162b6e6926540f2f1af2 (diff) | |
download | mupdf-71b44f14fd09fe3cb404f6f9225b3e4987328e15.tar.xz |
Rename span to stride, and add gray->bgr fast path image drawing.
Diffstat (limited to 'fitz/res_halftone.c')
-rw-r--r-- | fitz/res_halftone.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fitz/res_halftone.c b/fitz/res_halftone.c index 180c9c0a..139be112 100644 --- a/fitz/res_halftone.c +++ b/fitz/res_halftone.c @@ -173,15 +173,15 @@ fz_bitmap *fz_halftone_pixmap(fz_pixmap *pix, fz_halftone *ht) { fz_bitmap *out; unsigned char *ht_line, *o, *p; - int w, h, x, y, n, pspan, ospan; + int w, h, x, y, n, pstride, ostride; - if ((pix == NULL) || (ht == NULL)) + if (pix == NULL || ht == NULL) return NULL; assert(pix->n == 2); /* Mono + Alpha */ n = pix->n-1; /* Remove alpha */ - ht_line = fz_malloc(sizeof(unsigned char)*pix->w*n); + ht_line = fz_malloc(pix->w * n); out = fz_new_bitmap(pix->w, pix->h, n); o = out->samples; p = pix->samples; @@ -190,14 +190,14 @@ fz_bitmap *fz_halftone_pixmap(fz_pixmap *pix, fz_halftone *ht) x = pix->x; y = pix->y; w = pix->w; - ospan = out->span; - pspan = pix->w * pix->n; + ostride = out->stride; + pstride = pix->w * pix->n; while (h--) { make_ht_line(ht_line, ht, x, y++, w); do_threshold_1(ht_line, p, o, w); - o += ospan; - p += pspan; + o += ostride; + p += pstride; } return out; } |