|
Adds image (JPEG, TIFF, PNG) with chroma-key mask to the PDF file. Before you draw the image, you must add image to the PDF file first.
Public Function PDFAddImageFromFile2( _ ByVal strImageFile As String ,_ ByVal iRedMask As Integer ,_ ByVal iGreenMask As Integer ,_ ByVal iBlueMask As Integer ,_ ByVal iThreshold As Integer ,_ ) As long
|
Parameter
strImageFile the path of image file. It support JPEG, TIFF, PNG files.
iRedMask the red RGB value of color that should be masked.
iGreenMask the green RGB value of color that should be masked.
iBlueMask the blue RGB value of color that should be masked.
iThreshold threshold colors are masked that are in the range [(r-threshold, r+threshold),(g-threshold, g+threshold),(b-threshold, b+threshold)], default is 0. Return Value
Return the image ID.
Example
|
Visual Basic Syntax ImageViewer1.PDFInitAnnotation imageId = ImageViewer1.PDFAddImageFromFile2("C:\myfolder\sample.png",0,0,0,0) If imageId <> -1 Then ImageViewer1.PDFDrawImage 0, imageId, 50000, 10000, 50000, 50000 ImageViewer1.PDFDrawImage 0, imageId, 50000, 60000, 32000, 24000 End If
|
|
|