Home     Products      Support      Corporate     Sign In 
Support Knowledge Base, Article 621
Product
ImgWriter
Version
1.1.5
Title
Error: "Can not write image data to the storage. Image file could not be saved ..."
Problem
If an ImgWriter script is missing the Metadata tag, then the user receives a "Can not write image data to the storage ..." error when the SaveImage method is called.
Solution
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
%>		

Created : 5/1/2003 12:00:00 AM (last modified : 5/5/2003 4:49:24 PM)
Rate this article!
Comments