diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2013-06-20 15:02:08 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2013-06-20 16:46:10 +0200 |
commit | 73f5ba5cb7520a01d5bc4d85358f21d298d33317 (patch) | |
tree | d91890b7ccdbb59ff992d96f281bcb2a88ca2292 | |
parent | 643370f04348569b5e5e577660031d638537671c (diff) | |
download | mupdf-73f5ba5cb7520a01d5bc4d85358f21d298d33317.tar.xz |
Rename fz_image_to_pixmap to fz_new_pixmap_from_image.
Match our naming conventions.
-rw-r--r-- | include/mupdf/fitz/image.h | 4 | ||||
-rw-r--r-- | source/fitz/draw-device.c | 6 | ||||
-rw-r--r-- | source/fitz/image.c | 2 | ||||
-rw-r--r-- | source/tools/pdfextract.c | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/include/mupdf/fitz/image.h b/include/mupdf/fitz/image.h index 2c6850c8..5f258844 100644 --- a/include/mupdf/fitz/image.h +++ b/include/mupdf/fitz/image.h @@ -20,7 +20,7 @@ typedef struct fz_image_s fz_image; /* - fz_image_to_pixmap: Called to get a handle to a pixmap from an image. + fz_new_pixmap_from_image: Called to get a handle to a pixmap from an image. image: The image to retrieve a pixmap from. @@ -34,7 +34,7 @@ typedef struct fz_image_s fz_image; Returns a non NULL pixmap pointer. May throw exceptions. */ -fz_pixmap *fz_image_to_pixmap(fz_context *ctx, fz_image *image, int w, int h); +fz_pixmap *fz_new_pixmap_from_image(fz_context *ctx, fz_image *image, int w, int h); /* fz_drop_image: Drop a reference to an image. diff --git a/source/fitz/draw-device.c b/source/fitz/draw-device.c index e993daf7..bdafc4d5 100644 --- a/source/fitz/draw-device.c +++ b/source/fitz/draw-device.c @@ -1095,7 +1095,7 @@ fz_draw_fill_image(fz_device *devp, fz_image *image, const fz_matrix *ctm, float dx = sqrtf(local_ctm.a * local_ctm.a + local_ctm.b * local_ctm.b); dy = sqrtf(local_ctm.c * local_ctm.c + local_ctm.d * local_ctm.d); - pixmap = fz_image_to_pixmap(ctx, image, dx, dy); + pixmap = fz_new_pixmap_from_image(ctx, image, dx, dy); orig_pixmap = pixmap; /* convert images with more components (cmyk->rgb) before scaling */ @@ -1196,7 +1196,7 @@ fz_draw_fill_image_mask(fz_device *devp, fz_image *image, const fz_matrix *ctm, dx = sqrtf(local_ctm.a * local_ctm.a + local_ctm.b * local_ctm.b); dy = sqrtf(local_ctm.c * local_ctm.c + local_ctm.d * local_ctm.d); - pixmap = fz_image_to_pixmap(ctx, image, dx, dy); + pixmap = fz_new_pixmap_from_image(ctx, image, dx, dy); orig_pixmap = pixmap; fz_try(ctx) @@ -1299,7 +1299,7 @@ fz_draw_clip_image_mask(fz_device *devp, fz_image *image, const fz_rect *rect, c fz_try(ctx) { - pixmap = fz_image_to_pixmap(ctx, image, dx, dy); + pixmap = fz_new_pixmap_from_image(ctx, image, dx, dy); orig_pixmap = pixmap; state[1].mask = mask = fz_new_pixmap_with_bbox(dev->ctx, NULL, &bbox); diff --git a/source/fitz/image.c b/source/fitz/image.c index 73b4bc28..62561762 100644 --- a/source/fitz/image.c +++ b/source/fitz/image.c @@ -1,7 +1,7 @@ #include "mupdf/fitz.h" fz_pixmap * -fz_image_to_pixmap(fz_context *ctx, fz_image *image, int w, int h) +fz_new_pixmap_from_image(fz_context *ctx, fz_image *image, int w, int h) { if (image == NULL) return NULL; diff --git a/source/tools/pdfextract.c b/source/tools/pdfextract.c index 6e8e4aec..e7418224 100644 --- a/source/tools/pdfextract.c +++ b/source/tools/pdfextract.c @@ -72,7 +72,7 @@ static void saveimage(int num) /* TODO: detect DCTD and save as jpeg */ image = pdf_load_image(doc, ref); - pix = fz_image_to_pixmap(ctx, image, 0, 0); + pix = fz_new_pixmap_from_image(ctx, image, 0, 0); fz_drop_image(ctx, image); sprintf(name, "img-%04d", num); |