/>
Formatting options for images

This page is part of the explanation about the formatting options with datanames.

renderimage

Can be applied to images

Renderimage allows you to specify how an image should be displayed. You have the following options:

width

Example: image@visual|renderimage:width=400

The above example ensures that the image is not displayed wider than 400 pixels. If no specific way of scaling is specified, it means that the image is scaled until it is exactly 400 pixels wide.

height

Example: image@visual|renderimage:height=300

The above example ensures that the image is not displayed with a heigth over 300 pixels. If no specific way of scaling is specified, it means that the image is scaled until it is exactly 300 pixels high.

scaletype

Example: image@visual|renderimage:scaletype=fit-cc:width=400:height=250

In the example above, in addition to the height and width, the way in which the image has to be made to size is also included. The following options for scaling or croppping  available:

  • scale: make sure that the image falls exactly within the dimensions. In the above example, that means exactly 400 widths and no higher than 250 or exactly 250 high and no wider than 400.
  • scaledown: works the same as scale, unless the image is smaller than the specified measures. The image is not stretched to meet the sizes.
  • fit: ensures that the image is exactly 400 by 250. First the image is scaled to a width of 400 or an height of 250. The part that is still too wide or high is cut off.
  • fit-lt: works the same as fit, where the part that remains is always the top left corner
  • fit-ct: works the same as fit, where the part that remains is always the middle of the top
  • fit-rt: works the same as fit, where the part that remains is always the top right corner
  • fit-lc: works the same as fit, where the part that remains is always the middle of the left side
  • fit-cc: works the same as fit, where the part that remains is always the middle of the image
  • fit-rc: works the same as fit, where the part that remains is always the middle of the right side
  • fit-lb: works the same as fit, where the part that remains is always the bottom left corner
  • fit-cb: works the same as fit, where the part that remains is always the middle of the bottom
  • fit-rb: works the same as fit, where the part that remains is always the bottom right corner

Contact us

Do you want to participate in the dataname project? Or do you want to implement datanames and looking for some help? Send us a message and we'll be teaming up!

Datanames are an essential part of the Webanizr project