Expand description
Image resources: \saveimageresource, \useimageresource,
\lastsavedimageresourceindex and \lastsavedimageresourcepages.
Behaviour established black-box against LuaTeX 1.22:
\saveimageresourcetakes, in any order,width,height,depth(dimensions),attr {…},named {…},page n,colorspace n,userpassword {…},ownerpassword {…}and a page box keyword (mediabox,cropbox,bleedbox,trimbox,artbox), then the file name in braces.- A resource’s index (
\lastsavedimageresourceindex,\lastsavedboxresourceindex, the number\useimageresourceand\useboxresourcetake) is the PDF object number reserved for it, so\the\lastsavedboxresourceindex\space 0 Rrefers to the form (pgf’s soft masks rely on this).pdf.getobjtypereportsximageorxformfor it. \useimageresource [width…] [height…] [depth…] nappends a rule node of subtype 2 (shown as\image(h+d)xw) in any mode.- Sizes given to either command are completed from the image’s natural aspect ratio: a width alone sets height = width × h₀ / w₀; a height (plus depth) alone sets width = (height + depth) × w₀ / h₀.
- The image is written to the PDF when it is first shipped out, or at
once with
\immediate. Its file name, as found, is printed as<path>then: at once with\immediate, otherwise at the end of the page (after the page’s\writes), in the order of first use.
Structs§
- BoxResource
- A saved box resource (
\saveboxresource): a TeX box written as a PDF form XObject when first used (or at once with\immediate). - Image
Resource - A saved image resource.
Constants§
- BOX_
RESOURCE_ RULE - Rule subtype of box-resource nodes (
\useboxresource). - IMAGE_
RULE - Rule subtype of image nodes.