- ⌂ #IMAGE
- Operations
#IMAGE New
Return a new image based on an optional dimensions and color. If dimensions or color are not specified, a 1x1 transparent image will be returned.
Prototype
#IMAGE('', 'New', $width = 1, $height = 1, $color = 'transparent')
Parameters
#IMAGE always takes an image for the first parameter, but since this processor does not require an image, the first parameter must be an empty string.
- width - Width of new image, in pixels. Default is 1 pixel.
- height - Height of new image, in pixels. Default is 1 pixel.
- color - String representing a color to use for all image pixels.
Example
The following example rotates the image before applying the shadow and then rotates it back, to work-around the x/y parameters having no effect (issue with PHP ImageMagick).
#NEW($Bg)#IMAGE('', New, 120, 120, blue)#ENDNEW
#NEW($Logo)#CONTEXT(ImageMediaFile,Logo)$Data#ENDCONTEXT#ENDNEW
#NEW($Img)#IMAGE($Bg,'Composite',$Logo,32,32,'Dissolve',100)#ENDNEW