Load an image from data.

 

   
Syntax
 
     

Image.SetData Data

 

   
Params
 
     
Name   Type   Description
Data Object The data containing the graphic.

 

   
Notes
 
     

Load an image from data. The data is expected to be provided as an array of bytes.

The data can be any of the following types: JPEG, GIF, TIFF, BMP, PNG, EXIF, WMF or EMF.

Different images within the file can be accessed using the Frame property. Different portions of the image can be selected using the Selection property.

 

   
Example
 
     

Here we read a TIFF file and present the data to the Image object. We then add the image to our document and then save the PDF.

Set theDoc = Server.CreateObject("ABCpdf3.Doc")
Set theImg = Server.CreateObject("ABCpdf3.Image")
theData = ReadData("c:\mypic.tif")
' ReadData is an external function
theImg.SetData theData
theDoc.Rect.Inset 20, 20
theDoc.AddImage theImg
theDoc.Save "c:\mypdfs\imagesetdata.pdf
"


imagesetfile.pdf

 

   

 

Browser Based Help. Published by chm2web software.