Print Page | Close Window

Using masks for image transparency

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=279
Printed Date: 05 May 24 at 4:31AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Using masks for image transparency
Posted By: mrickan
Subject: Using masks for image transparency
Date Posted: 22 Jan 06 at 11:44PM

Hi everyone,

I'm just new to the QuickPDF library and I was wondering if someone had a small example of how to set a mask to preserve the transparency in a GIF or PNG image in the outgoing PDF.

I've checked the bug list and I'm assuming that this works as expected.

Mark




Replies:
Posted By: Michel_K17
Date Posted: 24 Jan 06 at 10:56PM
The use of transparencies in PDFs is an interesting subject. Transparencies are indeed supported since specification v1.3 (Acrobat v5) but it is not supported by the Postscript Printer language. Therefore, a transparent object in a program such as MS Word will not look "right" in the PDF, and will usually be a simulated transparency (a bitmap with holes).

With respect to the quickpdf library, I have good news and bad news: you can insert transparent GIF files, and they seem to be handled properly and will even display properly in the PDF Reader. However, the bad news, if you also decide to use QuickPDF to display a PDF by generating an image of a page of a PDF will convert the transparent GIF into garbage (all garbled).

Therefore, if you plan to use quickPDF to render, then you will hit that limitation. Otherwise, you should be OK.


Posted By: mrickan
Date Posted: 24 Jan 06 at 11:40PM

This is encouraging from the PDF generation side at least.

Have you had any success using the masking features for this purpose? I've been able to set the transparent colour for an image using SetImageMask but it's not clear to me the order of operations to do the same using SetImageMaskfromImage.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk