CreateImage

The CreateImage method creates an image. This function should be called in first turn after creation of SHOTGraph object.

CreateImage nXSize, nYSize, nColors

Parameters

nXSize
Specifies the horizontal size of the image

nYSize
Specifies the vertical size of the image

nColors
Specifies the number of colors in the image. This positive number must be divided by 2 without a remainder and later or equal than 256. So possible values are 2, 4, 8, 16, 32, 64, 128, 256.

Return Value

This function returns True if successful, otherwise returns False.

Remarks

This function creates an image and all required resources for its functionality.
You can call the CreateImage function several times. Each next calling deletes previously created image.

Example

<%@ Language=VBScript %>
<%

..............................

set obj=Server.CreateObject("shotgraph.image")
'Creating of image 320x240 with 4 colors and checking
if obj.CreateImage(320,240,4)=False then
	Response.Write("Image creation was failed!!!")
end if

..............................

%>