Saves the canvas image as a file.



Canvas.SaveAs inFile, inParams


Name   Type   Description
inFile String The path specifying the file to be saved (including file extension).
inParams String A parameter string containing Image Export parameters. The Type Image Manipulation parameter.



This method saves the Canvas image to a file. The file name extension is used to find the appropriate format for the file.

You can use the Image Export parameters to control the exact output format. Using these you can exert control over a range of different options including quality, resolution (dpi), palette creation, transparency and inclusion of an alpha channel.


See Also

Canvas GetAs function.



Set ca = Server.CreateObject("ImageGlue7.Canvas")
ca.DrawFile Server.MapPath("boat.gif"), ""
ca.SaveAs Server.MapPath("myfile1.jpg"), ""
ca.SaveAs Server.MapPath("myfile2"), "Type=jpeg"
ca.SaveAs Server.MapPath("myfile3.gif"), "Interlace=true"
ca.SaveAs Server.MapPath("myfile4.gif"), "Transparent=10,10"

This code produces four files as output. The first two files ('myfile1.jpg' and 'myfile') are jpeg images. Because the second file has no file extension the type parameter is needed to specify that the image type should be jpeg.

The second two files ('myfile3.gif' and 'myfile4.gif') are both gif images. The first is interlaced and the second is transparent (using the color at the point 10,10 as the transparent color).