Draws an image from a graphic file onto the Canvas.



outRect = Canvas.DrawFile(inFile, inParams)


Name   Type   Description
inFile String The path to the file to be drawn.
inParams String A parameter string containing Override parameters, Positioning parameters, Transform parameters and Image Manipulation parameters.
outRect See Desc.

The Rect (before transformation) of the area drawn to.

Under ASP the return value is a comma delimited string.



Draws an image from a graphic file onto the Canvas.

If both the width and height of the Canvas have been specified the positioning of the image on the canvas will be determined by the Positioning and Transform parameters.

If the size of the canvas has not been completely determined the canvas will be Autosized.


See Also

Canvas DrawData function.



Set ca = Server.CreateObject("ImageGlue7.Canvas")
inpath = Server.MapPath("layers.psd")
outpath = Server.MapPath("drawfile.jpg")
ca.Color = "yellow"
ca.Width = 200
ca.Height = 200
ca.DrawFile inpath, "Image=4 Mode=transparent"
ca.SaveAs outpath, "Quality=high"

The code looks for a Photoshop file called 'layers.psd' in the root directory of the web server. It pulls out the fourth image (there is one composite image and three layers in the file) and draws it transparent onto a yellow background. Finally it saves out the image as a jpeg. The input and output is shown below.