diff --git a/main.c b/main.c index 0f00e9a..5013058 100644 --- a/main.c +++ b/main.c @@ -249,11 +249,8 @@ save_to_png_output save_to_png(save_to_png_input input) { } } - // Update the scale_factor based on the DPI. - float scale_dpi = ((float)(input.dpi - 72) / 72) * 100; - scale_factor = scale_factor * (1 + (scale_dpi / 100)); - - fz_matrix ctm = fz_scale(scale_factor, scale_factor); + float resolution = (float)(input.dpi) / 72; + fz_matrix ctm = fz_concat(fz_scale(resolution, resolution), fz_scale(scale_factor, scale_factor)); bounds = fz_transform_rect(bounds, ctm); fz_irect bbox = fz_round_rect(bounds); pixmap = fz_new_pixmap_with_bbox(ctx, fz_device_rgb(ctx), bbox, NULL, 1); diff --git a/misc/mupdf/lib/x86-64-linux/libmupdf-third.a b/misc/mupdf/lib/x86-64-linux/libmupdf-third.a index 7cd763c..c22297c 100644 Binary files a/misc/mupdf/lib/x86-64-linux/libmupdf-third.a and b/misc/mupdf/lib/x86-64-linux/libmupdf-third.a differ diff --git a/misc/mupdf/lib/x86-64-linux/libmupdf.a b/misc/mupdf/lib/x86-64-linux/libmupdf.a index 68e36d1..5abcba5 100644 Binary files a/misc/mupdf/lib/x86-64-linux/libmupdf.a and b/misc/mupdf/lib/x86-64-linux/libmupdf.a differ