diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2015-12-18 15:30:46 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2015-12-28 13:21:02 +0100 |
commit | 497d9f348c23ff0465147734bf5dcb548511b256 (patch) | |
tree | 316500b56d3eae73ba90a8cf60ca717643f5c592 /source/fitz/image.c | |
parent | 17db174004b7d94777d2c3d2d09c8fba629b6e78 (diff) | |
download | mupdf-497d9f348c23ff0465147734bf5dcb548511b256.tar.xz |
Rename fz_image_get_pixmap to fz_get_pixmap_from_image.
Diffstat (limited to 'source/fitz/image.c')
-rw-r--r-- | source/fitz/image.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/source/fitz/image.c b/source/fitz/image.c index a1a3be6a..34f0dd6a 100644 --- a/source/fitz/image.c +++ b/source/fitz/image.c @@ -2,14 +2,6 @@ #define SANE_DPI 72.0f -fz_pixmap * -fz_new_pixmap_from_image(fz_context *ctx, fz_image *image, int w, int h) -{ - if (image == NULL) - return NULL; - return fz_image_get_pixmap(ctx, image, w, h); -} - fz_image * fz_keep_image(fz_context *ctx, fz_image *image) { @@ -103,7 +95,7 @@ fz_mask_color_key(fz_pixmap *pix, int n, int *colorkey) static void fz_unblend_masked_tile(fz_context *ctx, fz_pixmap *tile, fz_image *image) { - fz_pixmap *mask = fz_image_get_pixmap(ctx, image->mask, tile->w, tile->h); + fz_pixmap *mask = fz_get_pixmap_from_image(ctx, image->mask, tile->w, tile->h); unsigned char *s = mask->samples, *end = s + mask->w * mask->h; unsigned char *d = tile->samples; int k; @@ -293,13 +285,16 @@ standard_image_get_pixmap(fz_context *ctx, fz_image *image, int w, int h, int *l } fz_pixmap * -fz_image_get_pixmap(fz_context *ctx, fz_image *image, int w, int h) +fz_get_pixmap_from_image(fz_context *ctx, fz_image *image, int w, int h) { fz_pixmap *tile; int l2factor, l2factor_remaining; fz_image_key key; fz_image_key *keyp; + if (!image) + return NULL; + /* 'Simple' images created direct from pixmaps will have no buffer * of compressed data. We cannot do any better than just returning * a pointer to the original 'tile'. |