[XeTeX] Wrong dimensions when using \XeTeXpicfile with CMYK image
Akira Kakuto
kakuto at fuk.kindai.ac.jp
Mon Feb 9 08:00:48 CET 2015
Dear Marcel,
>> At tex.stackexchange.com a moderator thinks it's a bug in xdvipdfmx.
>> If so, where to report it?
> The bug may not be in xdvipdfmx, but it may be in XeTeX itself.
> See below.
I think I have fixed the problem in r36241 in TeX Live
repository. I have changed XeTeX_pic.c and image/jpegimage.c
a little. Please test. A pdf file for your source is attached.
\nopagenumbers
% The TeXbook, p. 311
\def\hidehrule#1#2{\kern-#1%
\hrule height#1 depth#2 \kern-#2 }
\def\hidevrule#1#2{\kern-#1{\dimen0=#1
\advance\dimen0 by#2\vrule width\dimen0}\kern-#2 }
\def\makeblankbox#1#2{\hbox{\lower\dp0\vbox{\hidehrule{#1}{#2}%
\kern-#1 % overlap the rules at the corners
\hbox to \wd0{\hidevrule{#1}{#2}%
\raise\ht0\vbox to #1{}% set the vrule height
\lower\dp0\vtop to #1{}% set the vrule depth
\hfil\hidevrule{#2}{#1}}%
\kern-#1\hidehrule{#2}{#1}}}}
\def\pic#1{\setbox0=\vbox{\XeTeXpicfile #1 width 8cm}
\vbox{\leavevmode\copy0\kern-\wd0\makeblankbox{.25pt}{.25pt}}}
\pic{test-cmyk300.jpg}
\bigskip
\pic{test-cmyk72.jpg}
\bigskip
\pic{test-rgb300.jpg}
\bye
Best,
Akira
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.pdf
Type: application/pdf
Size: 256490 bytes
Desc: not available
URL: <http://tug.org/pipermail/xetex/attachments/20150209/2f1b53ba/attachment-0001.pdf>
More information about the XeTeX
mailing list