This method inserts an image from an imageBuffer (containing image data) into a PDF document and returns the index of the image.
LONG AddImageFromMemory ( LPSTR imageBuffer, LONG bufferSizeInBytes, TxImageCompressionType compressionType ) |
The length of the memory buffer specified by the bufferSizeInBytes parameter and compressionType help determine the type of image.
The return value is an image identifier in the document's images collection and can be used in FlipImage, GetImageHeight, GetImageResolution, GetImageWidth, MakeImageGrayScale, MakeImageNegative, PlaceImageToCurrentPage, PDFPAGE_ShowImage.
Equivalent in new interface: IPDFDocument4::AddImageFromBuffer.
{ PDF object is supposed to be created } PDF.BeginDoc; j := PDF.AddImageFromMemory(Buffer, BufLen ,itcJpeg); PDF.PDFPAGE_ShowImage(j, 5, 5, 255, 367, 0); PDF.EndDoc;
// PDF object is supposed to be created PDF->BeginDoc(); LONG j = PDF->AddImageFromMemory(Buffer, BufLen, itcJpeg); PDF->PDFPAGE_ShowImage(j, 5, 5, 255, 367, 0); PDF->EndDoc();
// PDF object is supposed to be created PDF.BeginDoc(); long j = PDF.AddImageFromMemory(Buffer, BufLen, TxImageCompressionType.itcJpeg); PDF.PDFPAGE_ShowImage(j, 5, 5, 255, 367, 0); PDF.EndDoc;
' PDF object is supposed to be created PDF.BeginDoc j = PDF.AddImageFromMemory(Buffer, BufLen, itcJpeg) PDF.PDFPAGE_ShowImage j, 5, 5, 255, 367, 0 PDF.EndDoc