summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/mupdf/fitz/pixmap.h2
-rw-r--r--source/fitz/draw-device.c8
-rw-r--r--source/fitz/font.c2
-rw-r--r--source/fitz/pixmap.c2
-rw-r--r--source/pdf/pdf-image.c2
5 files changed, 5 insertions, 11 deletions
diff --git a/include/mupdf/fitz/pixmap.h b/include/mupdf/fitz/pixmap.h
index ee5520dc..29fe7b00 100644
--- a/include/mupdf/fitz/pixmap.h
+++ b/include/mupdf/fitz/pixmap.h
@@ -319,7 +319,7 @@ void fz_drop_pixmap_imp(fz_context *ctx, fz_storable *pix);
void fz_copy_pixmap_rect(fz_context *ctx, fz_pixmap *dest, fz_pixmap *src, const fz_irect *r);
void fz_premultiply_pixmap(fz_context *ctx, fz_pixmap *pix);
-fz_pixmap *fz_alpha_from_gray(fz_context *ctx, fz_pixmap *gray, int luminosity);
+fz_pixmap *fz_alpha_from_gray(fz_context *ctx, fz_pixmap *gray);
size_t fz_pixmap_size(fz_context *ctx, fz_pixmap *pix);
fz_pixmap *fz_scale_pixmap(fz_context *ctx, fz_pixmap *src, float x, float y, float w, float h, fz_irect *clip);
diff --git a/source/fitz/draw-device.c b/source/fitz/draw-device.c
index 1aa620cf..f460da85 100644
--- a/source/fitz/draw-device.c
+++ b/source/fitz/draw-device.c
@@ -159,7 +159,6 @@ struct fz_draw_state_s {
fz_pixmap *mask;
fz_pixmap *shape;
int blendmode;
- int luminosity;
int id;
float alpha;
fz_matrix ctm;
@@ -1850,10 +1849,8 @@ fz_draw_begin_mask(fz_context *ctx, fz_device *devp, const fz_rect *rect, int lu
#ifdef DUMP_GROUP_BLENDS
dump_spaces(dev->top-1, "Mask begin");
- printf("%s\n", luminosity ? "(luminosity)" : "");
#endif
state[1].scissor = bbox;
- state[1].luminosity = luminosity;
}
fz_catch(ctx)
{
@@ -1867,7 +1864,6 @@ fz_draw_end_mask(fz_context *ctx, fz_device *devp)
fz_draw_device *dev = (fz_draw_device*)devp;
fz_pixmap *temp, *dest;
fz_irect bbox;
- int luminosity;
fz_draw_state *state;
if (dev->top == 0)
@@ -1877,8 +1873,6 @@ fz_draw_end_mask(fz_context *ctx, fz_device *devp)
}
state = &dev->stack[dev->top-1];
STACK_CONVERT("(mask)");
- /* pop soft mask buffer */
- luminosity = state[1].luminosity;
#ifdef DUMP_GROUP_BLENDS
dump_spaces(dev->top-1, "Mask -> Clip: ");
@@ -1889,7 +1883,7 @@ fz_draw_end_mask(fz_context *ctx, fz_device *devp)
fz_try(ctx)
{
/* convert to alpha mask */
- temp = fz_alpha_from_gray(ctx, state[1].dest, luminosity);
+ temp = fz_alpha_from_gray(ctx, state[1].dest);
if (state[1].mask != state[0].mask)
fz_drop_pixmap(ctx, state[1].mask);
state[1].mask = temp;
diff --git a/source/fitz/font.c b/source/fitz/font.c
index 93546042..346168e8 100644
--- a/source/fitz/font.c
+++ b/source/fitz/font.c
@@ -1284,7 +1284,7 @@ fz_render_t3_glyph_pixmap(fz_context *ctx, fz_font *font, int gid, const fz_matr
{
fz_try(ctx)
{
- result = fz_alpha_from_gray(ctx, glyph, 0);
+ result = fz_alpha_from_gray(ctx, glyph);
}
fz_always(ctx)
{
diff --git a/source/fitz/pixmap.c b/source/fitz/pixmap.c
index 1ced3b53..6ebc4770 100644
--- a/source/fitz/pixmap.c
+++ b/source/fitz/pixmap.c
@@ -707,7 +707,7 @@ fz_unmultiply_pixmap(fz_context *ctx, fz_pixmap *pix)
}
fz_pixmap *
-fz_alpha_from_gray(fz_context *ctx, fz_pixmap *gray, int luminosity)
+fz_alpha_from_gray(fz_context *ctx, fz_pixmap *gray)
{
fz_pixmap *alpha;
unsigned char *sp, *dp;
diff --git a/source/pdf/pdf-image.c b/source/pdf/pdf-image.c
index fa1d7675..48aba958 100644
--- a/source/pdf/pdf-image.c
+++ b/source/pdf/pdf-image.c
@@ -51,7 +51,7 @@ pdf_load_image_imp(fz_context *ctx, pdf_document *doc, pdf_obj *rdb, pdf_obj *di
fz_drop_pixmap(ctx, tile);
tile = gray;
}
- mask_pixmap = fz_alpha_from_gray(ctx, tile, 1);
+ mask_pixmap = fz_alpha_from_gray(ctx, tile);
fz_drop_pixmap(ctx, tile);
fz_set_pixmap_image_tile(ctx, cimg, mask_pixmap);
}