Image size

TopLeaf determines the final size of a graphic as follows:

  1. The natural size of the graphic is determined. For vector formats (EPS and SVG) this is specified directly, while for bitmaps it depends on the resolution (dots per inch). If a bitmap graphic does not specify a resolution, the value of the Default DPI field is used.

    See SVG image file processing and PDF image processing in the User Guide for more information on how TopLeaf calculates the size of scalable image formats.

    If you have specified an attribute variable for the default DPI and the attribute is not present, TopLeaf uses the resolution of the current display device. Try to avoid using the resolution of the current display device, as it may give different results on different devices.

    You can use the <topleaf-properties/> command to explicitly set the device resolution to use.

  2. The scaling factor as specified by the Scale field is applied to enlarge or reduce the graphic.

  3. The image is reduced if necessary to fit within the available space. The space is determined by the area into which the content is being placed. The size of the available area will not be larger that the Width and/or Depth fields, if specified.

    In some cases it may be useful to use a Depth value less than the column height in the layout, in order to allow space for other material.

  4. The image may be reduced further if it is contained in bound content that is larger than the available space.

    By default, a warning will be generated if the total amount of additional scaling applied to allow for bound content exceeds 40%. You can use the <image-properties/> directive to adjust this threshold.

    Note that this type of scaling is not applied to images that are within a box or table cell.

  5. If a Minimum DPI has been specified for a bitmap graphic and the scaled graphic has an effective resolution less than this value, the graphic is reduced in size so that it matches the minimum DPI.

    For example, a graphic with a resolution of 300 dpi has a size of 1 inch square (in other words, it is 300 pixels wide and 300 pixels high). If the scale factor is set to 400% the graphic will appear with a size of 4in and have an effective resolution of 300 ÷ 4 = 75 dpi. If the minimum DPI is set to 100, the graphic will be reduced so that its resolution is 100 dpi, resulting in a size of 3in.

When a graphic is scaled, the same scaling factor is applied to both the width and height. Because of this the proportions, or aspect ratio of the graphic remain constant.