During the creation of a pdf file, I would like to transform the white background color of an image to a transparent background. SwapColorEx 0, 0, 0 produces black background.
- Code: Select all
GDIA.PdfNewPdf(path, "", "", "", "") Then
GDIA.PdfSetMeasurementUnits (2) ' cm
ImageA = GDIa.PdfAddImageFromGdPictureImage(GDVA.GetNativeImage)
GDIB.CloseNativeImage
GDIB.SetNativeImage (GDVB.GetNativeImage)
GDIB.SwapColorEx 0, 0, 0
ImageB = GDIB.PdfAddImageFromGdPictureImage(GDIB.GetNativeImage)
Call GDIA.PdfDrawImage(ImageB, 0, 0, width, height)