summaryrefslogtreecommitdiff
path: root/source/pdf/pdf-stream.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-04-14 13:51:32 +0100
committerRobin Watts <robin.watts@artifex.com>2016-04-28 12:30:43 +0100
commit44fff08dc64d358df441a9e615bbaacf7b01d54a (patch)
treebab4f36472952ccdfff594fd699230f2f15b1b23 /source/pdf/pdf-stream.c
parent88e9fd50724cff8d656060715fa56409ba7dab84 (diff)
downloadmupdf-44fff08dc64d358df441a9e615bbaacf7b01d54a.tar.xz
Refactor fz_image code cases.
Split compressed images (images based on a compressed buffer) and pixmap images (images based on a pixmap) out into separate subclasses.
Diffstat (limited to 'source/pdf/pdf-stream.c')
-rw-r--r--source/pdf/pdf-stream.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/pdf/pdf-stream.c b/source/pdf/pdf-stream.c
index 3c275d2d..167db0a7 100644
--- a/source/pdf/pdf-stream.c
+++ b/source/pdf/pdf-stream.c
@@ -344,7 +344,7 @@ pdf_open_inline_stream(fz_context *ctx, pdf_document *doc, pdf_obj *stmobj, int
}
void
-pdf_load_compressed_inline_image(fz_context *ctx, pdf_document *doc, pdf_obj *dict, int length, fz_stream *stm, int indexed, fz_image *image)
+pdf_load_compressed_inline_image(fz_context *ctx, pdf_document *doc, pdf_obj *dict, int length, fz_stream *stm, int indexed, fz_compressed_image *image)
{
fz_compressed_buffer *bc = fz_malloc_struct(ctx, fz_compressed_buffer);
@@ -357,14 +357,14 @@ pdf_load_compressed_inline_image(fz_context *ctx, pdf_document *doc, pdf_obj *di
stm = fz_open_leecher(ctx, stm, bc->buffer);
stm = fz_open_image_decomp_stream(ctx, stm, &bc->params, &dummy_l2factor);
- image->tile = fz_decomp_image_from_stream(ctx, stm, image, NULL, indexed, 0);
+ fz_set_compressed_image_tile(ctx, image, fz_decomp_image_from_stream(ctx, stm, image, NULL, indexed, 0));
+ fz_set_compressed_image_buffer(ctx, image, bc);
}
fz_catch(ctx)
{
fz_drop_compressed_buffer(ctx, bc);
fz_rethrow(ctx);
}
- image->buffer = bc;
}
/*