summaryrefslogtreecommitdiff
path: root/source/fitz/image.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-04-14 10:54:12 +0100
committerRobin Watts <robin.watts@artifex.com>2016-04-28 12:30:42 +0100
commit88e9fd50724cff8d656060715fa56409ba7dab84 (patch)
tree9e9487ddba3198f7432850f4c736da90b3d101dc /source/fitz/image.c
parent3dc16d54db4669415412bb44790d4653962747f6 (diff)
downloadmupdf-88e9fd50724cff8d656060715fa56409ba7dab84.tar.xz
Tweak fz_image in preparation for things to come.
Move from ints to bits where possible.
Diffstat (limited to 'source/fitz/image.c')
-rw-r--r--source/fitz/image.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/fitz/image.c b/source/fitz/image.c
index c622c92b..931eb44e 100644
--- a/source/fitz/image.c
+++ b/source/fitz/image.c
@@ -234,7 +234,7 @@ fz_decomp_image_from_stream(fz_context *ctx, fz_stream *stm, fz_image *image, fz
samples = NULL;
/* color keyed transparency */
- if (image->usecolorkey && !image->mask)
+ if (image->use_colorkey && !image->mask)
fz_mask_color_key(tile, image->n, image->colorkey);
if (indexed)
@@ -251,7 +251,7 @@ fz_decomp_image_from_stream(fz_context *ctx, fz_stream *stm, fz_image *image, fz
}
/* pre-blended matte color */
- if (image->usecolorkey && image->mask)
+ if (image->use_colorkey && image->mask)
fz_unblend_masked_tile(ctx, tile, image);
}
fz_always(ctx)
@@ -462,6 +462,7 @@ fz_get_pixmap_from_image(fz_context *ctx, fz_image *image, const fz_irect *subar
else
for (l2factor=0; image->w>>(l2factor+1) >= w+2 && image->h>>(l2factor+1) >= h+2 && l2factor < 6; l2factor++);
+
/* Now figure out if we want to decode just a subarea */
if (subarea == NULL)
{
@@ -628,7 +629,7 @@ fz_new_image(fz_context *ctx, int w, int h, int bpc, fz_colorspace *colorspace,
image->invert_cmyk_jpeg = 1;
image->interpolate = interpolate;
image->imagemask = imagemask;
- image->usecolorkey = (colorkey != NULL);
+ image->use_colorkey = (colorkey != NULL);
if (colorkey)
memcpy(image->colorkey, colorkey, sizeof(int)*image->n*2);
if (decode)