Transparent images in VPE file

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

Transparent images in VPE file

Postby nc1264 » Tue Apr 04, 2006 8:19 am

I have posted this question before and then my customer decided that we should not be doing this. But now the decision has been made that in some cases images must have transparent background.

I have therefore converted my jpg's to png. I used Paint.Net to do this and the image looks fine. All the white background is now transparent.

When inserting this image into my VPE document:
Code: Select all
.PICTURE(pnWhere, This.nBottom, vfree, vfree, lcFile, PIC_KEEPIMAGE+PIC_IN_FILE)


I get the image in the VPE but it has a black background.
I saw an other article about this topic on this forum and you mentioned setting the backgound to transparent:
Code: Select all
.BkgMode = VBKG_TRANSPARENT


Is this now something I need to set before inserting the picture into the document or is this something I need to do on a document level?

In other words: can you please help me on getting a PNG image with transparency into a VPE document not showing a black background in the image
nc1264
 
Posts: 28
Joined: Mon Dec 13, 2004 8:18 am

Postby IDEAL Software Support » Tue Apr 04, 2006 12:25 pm

Background transparency for bitmap images is not supported by VPE in the current version (v3.60 R4). This is, because in order to support transparency for printers it would be necessary to create internally a bitmap, merge images, text and all other objects together in this internal bitmap and to send the whole bitmap to the printer. Depending on the resolution of the printer this bitmap might become very very very large, which would slow down the printing process dramatically (and in addition an internal banding technique would be required, in order to split up the huge bitmap into smaller chunks, because memory consumption would be too high otherwise. This makes things even more complex and slower).

Code: Select all
.BkgMode = VBKG_TRANSPARENT


Is for all objects except images.
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 30 guests

cron