align align

Align Image with View. Aligns the composite image (possibly after scaling, if scl= is specified as well) within the view rectangle defined by wid= and hei=.

align= *horiz*, *vert*

horizontal alignment (real, -1.0…1.0)
vertical alignment (real, -1.0…1.0)

Specify align=-1,-1 to align the top-left of the composite image with the top-left of the view, specify align=1,1 to align the bottom, right of the image with the bottom right of the view. For standard image and thumbnail requests, any area of the view which is not covered by composite image data is filled with bgc=.

Properties section-3fbec8206fc944eda4746d8be84f3b41

View attribute. ( align= is also used to define the alignment between a watermark image and the composite image to which the watermark is applied.) Applies regardless of current layer setting. Ignored if only one of wid= and hei= is specified and when fit=constrain or fit=stretch.

Default section-8a9ceff3dcc844c3af23b1c9066dac79

align=0,0, which centers the image in the view rectangle.

Example section-2c9447aa2e184fb8ab1a4370dc61d554

The following request fits myImage into a 200x200 pixel view rectangle.


If myImage is exactly square, it fills the entire view rectangle. If myImage has a portrait aspect ratio, it is scaled to be 200 pixels tall and is centered horizontally in the view. If myImage has a landscape aspect ratio, it is scaled to be 200 pixels wide and is aligned to the top edge of the view. In all cases, the image returned is exactly 200x200 pixels in size; any space not covered by the scaled myImage is filled with attribute::BkgColor (specify bgc= to control the background color dynamically).

See also section-28b42c6db199456a800c8407faa26a99

wid= , hei=, fit=, bgc=, Watermarks