[NTG-pdftex] easy font expansion (image inclusion)

Hartmut Henkel hartmut_henkel@gmx.de
Sun, 9 May 2004 17:28:51 +0200 (CEST)


On Sun, 9 May 2004, Akira Kakuto wrote:

> I have obtained a very small "pointlike" image by
> \includegraphics{foo.jpg}
> where foo.jpg is a usual size image.
> Therefore I have revived previous values for arguments
> of "pdf_print_real" as follows:
>
>         pdf_append_list(pdf_ximage_objnum(p))(pdf_ximage_list);
>     if not is_pdf_image(image) then begin
>         pdf_print_real(ext_xn_over_d(pdf_width(p),
>                        ten_pow[6], one_hundred_bp), 6);
>         pdf_print(" 0 0 ");
>         pdf_print_real(ext_xn_over_d(pdf_height(p) + pdf_depth(p),
>                        ten_pow[6], one_hundred_bp), 6);
>
> ------->
>
>         pdf_append_list(pdf_ximage_objnum(p))(pdf_ximage_list);
>     if not is_pdf_image(image) then begin
>         pdf_print_real(ext_xn_over_d(pdf_width(p),
>                        ten_pow[4], one_bp), 4);
>         pdf_print(" 0 0 ");
>         pdf_print_real(ext_xn_over_d(pdf_height(p) + pdf_depth(p),
>                        ten_pow[4], one_bp), 4);

Using "ten_pow[6], one_hundred_bp" was based on the point, that the
constant one_hundred_bp is an exact value, whereas one_bp =
one_hundred_bp / 100 is a rounded one.

The division "ten_pow[4] / one_bp" should give the same result as
"ten_pow[6] / one_hundred_bp", but the latter one without rounding
error. The ext_xn_over_d() function, using double, would not overflow.

Therefore the effective difference by your change seems to be only the
", 4" instead of ", 6". So your result should be also ok when using

"ten_pow[6], one_hundred_bp), 4);"?

Mysterious. Do you have the image for download from somewhere?

Regards, Hartmut