<br><div class="gmail_quote">On Fri, Mar 4, 2011 at 12:28 PM, Heiko Oberdiek <span dir="ltr"><<a href="mailto:heiko.oberdiek@googlemail.com">heiko.oberdiek@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Fri, Mar 04, 2011 at 11:46:31AM -0500, William Adams wrote:<br>
<br>
> Will things be better in LuaTeX? Really, all one would need would be a<br>
> list structure which one could check before loading a graphic to see if it<br>
> had already been loaded --- add it to the list if not and it ``just<br>
> works''.<br>
<br>
</div>Some things can be done better with and without LuaTeX,<br>
some things can never be done better with or without LuaTeX,<br>
and some things can be done better with LuaTeX.<br>
Those "things" depend on the macro interface, the macro driver interface,<br>
the output driver, the TeX compiler and the output format.<br>
<br>
If the same image is used twice you have also take into account,<br>
how it is used. There are many parameters that influence the<br>
image loading (width, height, scaling, rotating, clipping, viewport,<br>
image manipulation options, ...). Some of the parameters can also<br>
be applied on the black box where the image is previously saved.<br>
Others require the reloading of the image. Of course, the set<br>
of parameters might differ for different drivers and image types.<br>
<br></blockquote><div> </div><div>There are two separate problems:</div><div><br></div><div>1) I want the image to be defined in an image XForm in the resulting PDF, and simply referenced each time it occurs.</div><div><br>
</div><div>2) I'd like the actual image file to be accessed as little as possible during the run of XeLaTeX, for performance reasons.</div><div><br></div><div>In a run of 35,000 pages, such as my current test, it's likely I'll encounter more than 256 unique images, so using box registers will not help in general. If I could identify the most frequently occurring images, I could use box registers for those but, alas, I have no way to do that without pre-processing the entire XML, and that's not an option. I could simply use box registers for the first 256 images encountered in a run, and that may actually help in most cases.</div>
<div><br></div><div>Also, as you point out, some of the images may be used multiple times, at different scales and or rotations. This is pretty common with logos, for example.</div><div><br></div><div>Thanks,</div><div>-pd</div>
<div><br></div></div><br>-- <br><span style="font-family:arial, sans-serif;border-collapse:collapse">----<div>The Tech Curmudgeon</div><div><a href="http://www.techcurmudgeon.com/" style="color:rgb(17, 65, 112)" target="_blank">http://www.techcurmudgeon.com</a></div>
<div style="font-size:10.8333px"><br></div></span><br>