Loading, Saving and Displaying an Image (ASP -VBScript)

This example dmonstrates how to load and display an image using the LEAD COM objects in ASP. The image is loaded from the server and saved on the server with a different name, then displayed in the browser using the <IMG> HTML tag. Just copy/paste this code into a text file, save it as .asp and open it in an Internet browser.

<%@ Language=VBScript %>
<%Option Explicit%>
<%
      Dim RasterObj
      Dim RasterIO
      Dim FILE_JFIF

      Set RasterObj = Server.CreateObject("LEADRaster.LEADRaster")
      Set RasterIO = Server.CreateObject("LEADRasterIO.LEADRasterIO")
      FILE_JFIF = 10

      RasterIO.Load RasterObj, "c:\save.jpg", 0, 0, 1
      RasterIO.Save RasterObj, "c:\asp.jpg", FILE_JFIF, 0, 2, 0

      Response.Write "<IMG SRC='c:\asp.jpg'>"
%>