Combining Images with Regions (ASP - JavaScript)
Copy the following code into an ASP file to combine two images with a region:
<%@ Language=JavaScript %>
<%
var RasterObj = Server.CreateObject("LEADRaster.LEADRaster.145");
var RasterObj2 = Server.CreateObject("LEADRaster.LEADRaster.145");
var RasterIO = Server.CreateObject("LEADRasterIO.LEADRasterIO.145");
var RasterProc = Server.CreateObject("LEADRasterProcess.LEADRasterProcess.140");
var FILE_JFIF = 10;
RasterIO.Load(RasterObj, "d:\\customers\\script.jpg", 0, 0, 1);
var CB_OP_ADD = 768;
var CB_DST_0 = 32;
RasterIO.Load(RasterObj, "d:\\customers\\temp1.jpg", 0, 0, 1);
RasterIO.Load(RasterObj2, "d:\\customers\\script.jpg", 0, 0, 1);
RasterObj.SetRgnRect(100, 100, 300, 300, 0);
RasterProc.Combine(RasterObj, 100, 100, 300, 300,
RasterObj2, 0, 0, CB_OP_ADD + CB_DST_0);
RasterObj.FreeRgn();
RasterIO.Save(RasterObj, "c:\\asp.jpg", FILE_JFIF, 0, 2, 0);
RasterIO.Save(RasterObj2, "c:\\asp2.jpg", FILE_JFIF, 0, 2, 0);
Response.Write("<IMG SRC='c:\\asp.jpg'>");
Response.Write("<IMG SRC='c:\\asp2.jpg'>");
%>