summaryrefslogtreecommitdiff
path: root/source/pdf/pdf-image.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2014-01-01 12:59:08 +0000
committerRobin Watts <robin.watts@artifex.com>2014-01-02 20:04:37 +0000
commitcf9a5e5e7af55d15a83f542041fc63c73ba57425 (patch)
tree52ffe3fee581258d59d4f72f6d719387832591cc /source/pdf/pdf-image.c
parent8dee8f716887aee52e2fba19a7ae0e2a443cb6df (diff)
downloadmupdf-cf9a5e5e7af55d15a83f542041fc63c73ba57425.tar.xz
Cull code unused as a result of the "tolerate inline images..." fix.
Remove code that's not used any more as a result of the previous fix, plus some code that was unused anyway.
Diffstat (limited to 'source/pdf/pdf-image.c')
-rw-r--r--source/pdf/pdf-image.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/source/pdf/pdf-image.c b/source/pdf/pdf-image.c
index f3f63d65..b22f39fb 100644
--- a/source/pdf/pdf-image.c
+++ b/source/pdf/pdf-image.c
@@ -18,6 +18,7 @@ pdf_load_image_imp(pdf_document *doc, pdf_obj *rdb, pdf_obj *dict, fz_stream *cs
fz_colorspace *colorspace = NULL;
float decode[FZ_MAX_COLORS * 2];
int colorkey[FZ_MAX_COLORS * 2];
+ int stride;
int i;
fz_context *ctx = doc->ctx;
@@ -133,7 +134,7 @@ pdf_load_image_imp(pdf_document *doc, pdf_obj *rdb, pdf_obj *dict, fz_stream *cs
}
/* Now, do we load a ref, or do we load the actual thing? */
- if (!cstm)
+ if (cstm == NULL)
{
/* Just load the compressed image data now and we can
* decode it on demand. */
@@ -145,20 +146,13 @@ pdf_load_image_imp(pdf_document *doc, pdf_obj *rdb, pdf_obj *dict, fz_stream *cs
}
/* We need to decompress the image now */
- if (cstm)
- {
- int stride = (w * n * bpc + 7) / 8;
- stm = pdf_open_inline_stream(doc, dict, stride * h, cstm, NULL);
- }
- else
- {
- stm = pdf_open_stream(doc, pdf_to_num(dict), pdf_to_gen(dict));
- }
+ stride = (w * n * bpc + 7) / 8;
+ stm = pdf_open_inline_stream(doc, dict, stride * h, cstm, NULL);
image = fz_new_image(ctx, w, h, bpc, colorspace, 96, 96, interpolate, imagemask, decode, usecolorkey ? colorkey : NULL, NULL, mask);
colorspace = NULL;
mask = NULL;
- image->tile = fz_decomp_image_from_stream(ctx, stm, image, cstm != NULL, indexed, 0, 0);
+ image->tile = fz_decomp_image_from_stream(ctx, stm, image, indexed, 0, 0);
}
fz_catch(ctx)
{