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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Adding a Gif image with transparency
  FAQ FAQ  Forum Search   Register Register  Login Login

Adding a Gif image with transparency

 Post Reply Post Reply
Author
Message
Eddy View Drop Down
Beginner
Beginner


Joined: 17 Nov 08
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote Eddy Quote  Post ReplyReply Direct Link To This Post Topic: Adding a Gif image with transparency
    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
Back to Top
Autodidact View Drop Down
Team Player
Team Player
Avatar

Joined: 03 Feb 06
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote Autodidact Quote  Post ReplyReply Direct Link To This Post Posted: 18 Feb 09 at 2:05PM
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)
Back to Top
Eddy View Drop Down
Beginner
Beginner


Joined: 17 Nov 08
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote Eddy Quote  Post ReplyReply Direct Link To This Post Posted: 18 Feb 09 at 5:07PM
 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
Back to Top
Autodidact View Drop Down
Team Player
Team Player
Avatar

Joined: 03 Feb 06
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote Autodidact Quote  Post ReplyReply Direct Link To This Post Posted: 19 Feb 09 at 1:52AM
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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store