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=.



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=.


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.


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


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

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