Loads an image from data.

 

   

Syntax
 

Image.SetData Data

 

   

Params
 
Name Type Description
Data Array of Bytes The data containing the graphic.

 

   

Notes
 

Loads 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("ABCpdf10.Doc")
Set theImg = Server.CreateObject("ABCpdf10.Image")
theData = ReadData("c:\mypics\mypic.tif")
' ReadData is an external function
theImg.SetData theData
theDoc.Rect.Inset 20, 20
theDoc.AddImageObject theImg, 1
theDoc.Save "c:\mypdfs\imagesetdata.pdf"


imagesetfile.pdf