Rotate image. Rotates the image, text, or solid color layer by the specified angle.

rotate= *angle*


Rotation angle in degrees (real).

Positive angles rotate clockwise. The layer anchor point ( anchor= or catalog::Anchor) serves as the center-of-rotation. The layer rectangle is enlarged and fitted around the rotated data as needed to avoid cropping. Rotation is applied after filling the layer’s background area with color=. bgColor= can be used to add background color to the bounding rectangle after rotation.


Layer command. Applies to the current layer or to layer 0 if layer=comp. Ignored by effect layers.


rotate=0, for no rotation.


Place an “On Sale” label near the top-left corner of images in an image catalog. The label image is already sized correctly for the 300x300 view and should be rotated 30 degrees to the left. Fill the text box with a white, semi-opaque color to enhance the label.

http:// *server*/myRootId/myImageId?scl=1&size=300,300&origin=-0.5,-0.5 &layer=1&src=labelImage&origin=-0.5,-0.5&rotate=-30&color=ffffff40

We apply size= to layer 0 to set the view size, rather than using wid= and hei=. This allows myImageId to be resized while not changing the final size of labelImage. We also need to specify scl=1, otherwise the composite image might be scaled to attribute::DefaultPix (unless that is set to 0,0). color= adds the semi-opaque background color to the text box before rotation.

The origin for both layers is set to the top-left corners, to achieve the desired alignment. Note that the origin point for layer 1 applies to labelImageafter it has been rotated.

See Example A in Templates for an example of rotated text.

See also

anchor= , bgColor=, color=

On this page