The SaveImage method of the ImageGen object takes a SaveMethod and ImageFormat parameter. If you use ImgWriter constants for these parameters (such as saiFile and saiJPG in the sample script below), you must be sure to include the Metadata tag at the top of your script. Without the Metadata tag, ImgWriter is not able to interpret the constants and will not know how to save the file.
To avoid the error, include Metadata tag between VB script tags like below:
<%@ Language=VBScript %>
<!--METADATA TYPE="TypeLib" UUID="{50D94450-589A-409B-819A-4F88B151C134}" -->
<%
Dim saImg
Set saImg = Server.CreateObject("SoftArtisans.ImageGen")
saImg.LoadImage "C:\sample.gif"
saImg.SaveImage saiFile, saiJPG, "C:\Images\sample_copy.jpg"
Response.End
%>
|