#### 32.8.2 Adjusting image size for selected graphics

If necessary you can adjust the size of an image to do any of the following:

Preserve aspect ratio

Suppress scaling

Specify width and height separately.

Preserve aspect ratio

To override both width and height of selected graphics, preserving the aspect ratio of each image; for example, to 75% of the original size:

    [GraphScale]
    ; Graphic ID = percent of original size to scale (both dimensions)
    GraphID = 75

Suppress scaling

To suppress scaling for selected graphics:

    [GraphScale]
    GraphID = 0

Setting the percent to zero suppresses scaling because DITA2Go does not write width and height attributes that have zero values.

Specify width and height separately

To override width and height separately for selected graphics, whether or not you use [GraphScale]:

    [GraphWide]
    ; Graphic ID = number of pixels wide, 0 to omit width attribute

    [GraphHigh]
    ; Graphic ID = number of pixels high, 0 to omit height attribute

However, be aware of the following issue with hard-coding the sizes of the graphics you reference in HTML files: localized graphics sometimes have a different size, and hard-coded sizes cause distortion.

Previous Topic: 32.8.1 Excluding image size attributes from HTML

Next Topic: 32.8.3 Specifying px units for graphics sized in pixels

Parent Topic: 32.8 Scaling images for HTML

Sibling Topics:

32.8.1 Excluding image size attributes from HTML

32.8.3 Specifying px units for graphics sized in pixels

Table of Contents • Index