Loads an image from data.




Image.SetData Data



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




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.




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("ABCpdf13.Doc")
Set theImg = Server.CreateObject("ABCpdf13.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"