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

This example demonstrates 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=JavaScript %>
<%
      var RasterObj = Server.CreateObject("LEADRaster.LEADRaster");
      var RasterIO = Server.CreateObject("LEADRasterIO.LEADRasterIO");
      var 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'>");

%>