Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
Adding a Gif image with transparency |
Post Reply |
Author | |
Eddy
Beginner Joined: 17 Nov 08 Status: Offline Points: 16 |
Post Options
Thanks(0)
Posted: 18 Feb 09 at 12:57PM |
Hi,
I am trying to add a gif image to a pdf file. Perhaps my question is stupid, but is it possible to manage the transparency of that image if it is a gif file with transparency ? I perform a AddImageFromFile, before a drawImage... and the result is an image with a white opaque backstyle... Do I do something wrong ? Thanks in advance. Eddy Edited by Eddy - 18 Feb 09 at 12:58PM |
|
Autodidact
Team Player Joined: 03 Feb 06 Status: Offline Points: 21 |
Post Options
Thanks(0)
|
I have only tried placing PNG-files with transparency, and although the file format supports it, the result was just as you experience with the GIF-file.
Since there are functions for making masks in the library, I tend to belive that transparence within the file is not supported. Check out the SetImageAsMask and SetImageMaskFromImage — and perhaps the ReverseImage. Maybe I should look into it myself too ... 8o) |
|
Eddy
Beginner Joined: 17 Nov 08 Status: Offline Points: 16 |
Post Options
Thanks(0)
|
In fact, I'm working on an application in whitch a user can create a pdf file and add images or text in it. So, I can't use the mask, since I don't know in advance whitch kind of image the user will add...
I thought that quickpdf should manage that, may be I'm wrong... or maybe it is a pdf limitation... Thanks for your answer, even if it is not exactly what I was looking for... Eddy |
|
Autodidact
Team Player Joined: 03 Feb 06 Status: Offline Points: 21 |
Post Options
Thanks(0)
|
You can set a mask based on colors in the image as well with SetImageMask/SetImageMaskCMYK, but then it is important that this color is not present in the part of the image that is to be preserved as it will make odd looking holes/gaps. In RGB, using pixels of 100% green should be the safest color to use. Using white would be asking for trouble, and as I see it, there are no way to specify a transparent pixel/color ...
There is also SetClippingPath. Images can have a clipping path added in Photoshop. I assume that would be a bit much to ask from the user to create such a path, and I am not so sure this path is what the documentation refer to but rather a path created with the library. I assume so because the function have no argument to specify the path to use. It only uses the "current path" object. I guess this is a library limitation, where the creators maybe have chosen the easy route because the library has no support for EPS-vector graphics either, and I could really use that as EMF import is unstable, and neither it or WMF supports CMYK-colors. |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store