summaryrefslogtreecommitdiff
path: root/source/pdf/pdf-device.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2015-06-26 17:43:06 +0100
committerRobin Watts <robin.watts@artifex.com>2015-06-29 12:14:49 +0100
commit051b4932219bed310e17505b2e73029d371a18ce (patch)
treeb9a650b6a900da04d8a3885c9ed9b00aa7b3abf7 /source/pdf/pdf-device.c
parent074060eaf09044836c084453c4752d4ae283fabc (diff)
downloadmupdf-051b4932219bed310e17505b2e73029d371a18ce.tar.xz
Rejig the internals of fz_image slightly.
Previously, we had people calling image->get_pixmap directly. Now we have them all call fz_image_get_pixmap, which will look for a cached version in the store, and only call get_pixmap if required. Previously fz_image_get_pixmap used to look for the cached version in the store, and decode if not - hence the decoding code is now extracted out into standard_image_get_pixmap. This was the original intent of the code, it just somehow didn't end up like that. This nicely queues us up for being able to have fz_images that use a different get_pixel implementation, such as that which will be required for the gprf code.
Diffstat (limited to 'source/pdf/pdf-device.c')
-rw-r--r--source/pdf/pdf-device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/pdf/pdf-device.c b/source/pdf/pdf-device.c
index 8b99c4f0..c65377ae 100644
--- a/source/pdf/pdf-device.c
+++ b/source/pdf/pdf-device.c
@@ -146,7 +146,7 @@ send_image(fz_context *ctx, pdf_device *pdev, fz_image *image, int mask, int sma
int n;
/* Currently, set to maintain resolution; should we consider
* subsampling here according to desired output res? */
- pixmap = image->get_pixmap(ctx, image, image->w, image->h);
+ pixmap = fz_image_get_pixmap(ctx, image, image->w, image->h);
colorspace = pixmap->colorspace; /* May be different to image->colorspace! */
n = (pixmap->n == 1 ? 1 : pixmap->n-1);
size = image->w * image->h * n;