diff options
Diffstat (limited to 'Build/source/texk/xdvipdfmx/src')
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/bmpimage.c | 4 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/jpegimage.c | 8 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/pdfximage.c | 7 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/pdfximage.h | 3 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/pngimage.c | 5 |
5 files changed, 8 insertions, 19 deletions
diff --git a/Build/source/texk/xdvipdfmx/src/bmpimage.c b/Build/source/texk/xdvipdfmx/src/bmpimage.c index 3897275ca06..813c74d5cca 100644 --- a/Build/source/texk/xdvipdfmx/src/bmpimage.c +++ b/Build/source/texk/xdvipdfmx/src/bmpimage.c @@ -145,8 +145,8 @@ bmp_include_image (pdf_ximage *ximage, FILE *fp) /* ignore biSizeImage */ p += 4; biXPelsPerMeter = ULONG_LE(p); p += 4; biYPelsPerMeter = ULONG_LE(p); p += 4; - info.xdpi = biXPelsPerMeter * 0.0254; /* convert pixels per meter to DPI */ - info.ydpi = biYPelsPerMeter * 0.0254; + info.xdensity = 72.0 / (biXPelsPerMeter * 0.0254); + info.ydensity = 72.0 / (biYPelsPerMeter * 0.0254); if (info.height < 0) { info.height = -info.height; flip = 0; diff --git a/Build/source/texk/xdvipdfmx/src/jpegimage.c b/Build/source/texk/xdvipdfmx/src/jpegimage.c index 45dc976f78c..a6605cc0c94 100644 --- a/Build/source/texk/xdvipdfmx/src/jpegimage.c +++ b/Build/source/texk/xdvipdfmx/src/jpegimage.c @@ -360,9 +360,10 @@ jpeg_include_image (pdf_ximage *ximage, FILE *fp) } } } - - info.xdpi = j_info.xdpi; - info.ydpi = j_info.ydpi; + else { /* resolution data from EXIF is handled here */ + info.xdensity = 72.0 / j_info.xdpi; + info.ydensity = 72.0 / j_info.ydpi; + } pdf_ximage_set_image(ximage, &info, stream); JPEG_info_clear(&j_info); @@ -650,7 +651,6 @@ read_APP1_Exif (struct JPEG_info *j_info, FILE *fp, unsigned short length) } } - j_info->xdpi = xres * res_unit; j_info->ydpi = yres * res_unit; diff --git a/Build/source/texk/xdvipdfmx/src/pdfximage.c b/Build/source/texk/xdvipdfmx/src/pdfximage.c index 2b8d135fd65..939ca59bc4b 100644 --- a/Build/source/texk/xdvipdfmx/src/pdfximage.c +++ b/Build/source/texk/xdvipdfmx/src/pdfximage.c @@ -65,7 +65,6 @@ struct attr_ long width, height; double xdensity, ydensity; pdf_rect bbox; - double xdpi, ydpi; }; struct pdf_ximage_ @@ -125,7 +124,6 @@ pdf_init_ximage_struct (pdf_ximage *I) I->attr.xdensity = I->attr.ydensity = 1.0; I->attr.bbox.llx = I->attr.bbox.lly = 0; I->attr.bbox.urx = I->attr.bbox.ury = 0; - I->attr.xdpi = I->attr.ydpi = 72.0; } static void @@ -480,7 +478,7 @@ pdf_ximage_init_image_info (ximage_info *info) info->bits_per_component = 0; info->num_components = 0; info->min_dpi = 0; - info->xdpi = info->ydpi = 72.0; + info->xdensity = info->ydensity = 1.0; } void @@ -499,9 +497,6 @@ pdf_ximage_set_image (pdf_ximage *I, void *image_info, pdf_obj *resource) I->attr.xdensity = info->xdensity; I->attr.ydensity = info->ydensity; - I->attr.xdpi = info->xdpi; - I->attr.ydpi = info->ydpi; - I->reference = pdf_ref_obj(resource); dict = pdf_stream_dict(resource); diff --git a/Build/source/texk/xdvipdfmx/src/pdfximage.h b/Build/source/texk/xdvipdfmx/src/pdfximage.h index ebcf3f6b2ff..6a943516760 100644 --- a/Build/source/texk/xdvipdfmx/src/pdfximage.h +++ b/Build/source/texk/xdvipdfmx/src/pdfximage.h @@ -39,9 +39,6 @@ typedef struct { int bits_per_component; int num_components; - double xdpi; - double ydpi; - long min_dpi; /* NOT USED YET */ double xdensity, ydensity; /* scale factor for bp */ diff --git a/Build/source/texk/xdvipdfmx/src/pngimage.c b/Build/source/texk/xdvipdfmx/src/pngimage.c index 45ee8089d6b..0176411e514 100644 --- a/Build/source/texk/xdvipdfmx/src/pngimage.c +++ b/Build/source/texk/xdvipdfmx/src/pngimage.c @@ -166,7 +166,7 @@ png_include_image (pdf_ximage *ximage, FILE *png_file) png_infop png_info_ptr; png_byte bpc, color_type; png_uint_32 width, height, rowbytes, xppm, yppm; - + pdf_ximage_init_image_info(&info); stream = NULL; @@ -195,9 +195,6 @@ png_include_image (pdf_ximage *ximage, FILE *png_file) xppm = png_get_x_pixels_per_meter(png_ptr, png_info_ptr); yppm = png_get_y_pixels_per_meter(png_ptr, png_info_ptr); - info.xdpi = png_get_x_pixels_per_meter(png_ptr, png_info_ptr) * 0.0254; - info.ydpi = png_get_y_pixels_per_meter(png_ptr, png_info_ptr) * 0.0254; - /* We do not need 16-bpc color. Ask libpng to convert down to 8-bpc. */ if (bpc > 8) { png_set_strip_16(png_ptr); |