summaryrefslogtreecommitdiff
path: root/source
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
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')
-rw-r--r--source/fitz/image.c4
-rw-r--r--source/pdf/pdf-image.c16
2 files changed, 7 insertions, 13 deletions
diff --git a/source/fitz/image.c b/source/fitz/image.c
index d6aadfbe..10a8bda4 100644
--- a/source/fitz/image.c
+++ b/source/fitz/image.c
@@ -118,7 +118,7 @@ fz_mask_color_key(fz_pixmap *pix, int n, int *colorkey)
}
fz_pixmap *
-fz_decomp_image_from_stream(fz_context *ctx, fz_stream *stm, fz_image *image, int in_line, int indexed, int l2factor, int native_l2factor)
+fz_decomp_image_from_stream(fz_context *ctx, fz_stream *stm, fz_image *image, int indexed, int l2factor, int native_l2factor)
{
fz_pixmap *tile = NULL;
int stride, len, i;
@@ -280,7 +280,7 @@ fz_image_get_pixmap(fz_context *ctx, fz_image *image, int w, int h)
stm = fz_open_image_decomp_stream(ctx, image->buffer, &native_l2factor);
indexed = fz_colorspace_is_indexed(image->colorspace);
- tile = fz_decomp_image_from_stream(ctx, stm, image, 0, indexed, l2factor, native_l2factor);
+ tile = fz_decomp_image_from_stream(ctx, stm, image, indexed, l2factor, native_l2factor);
/* CMYK JPEGs in XPS documents have to be inverted */
if (image->invert_cmyk_jpeg &&
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)
{