<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>Debenu Quick PDF Library - PDF SDK Community Forum : Support for Transparent images</title>
  <link>http://www.quickpdf.org/forum/</link>
  <description><![CDATA[This is an XML content feed of; Debenu Quick PDF Library - PDF SDK Community Forum : I need help - I can help : Support for Transparent images]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 17 Aug 2026 13:58:25 +0000</pubDate>
  <lastBuildDate>Sat, 24 Jul 2010 21:13:38 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 11.01</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.quickpdf.org/forum/RSS_post_feed.asp?TID=1514</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Debenu Quick PDF Library - PDF SDK Community Forum]]></title>
   <url>http://www.quickpdf.org/forum/forum_images/QPDF_Forum_Title.png</url>
   <link>http://www.quickpdf.org/forum/</link>
  </image>
  <item>
   <title><![CDATA[Support for Transparent images : Thanks everyone...support guys...]]></title>
   <link>http://www.quickpdf.org/forum/support-for-transparent-images_topic1514_post6758.html#6758</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1349">Taher</a><br /><strong>Subject:</strong> 1514<br /><strong>Posted:</strong> 24 Jul 10 at 9:13PM<br /><br />Thanks everyone...support guys have really been helpful ..top marks for quickpdf customer service and support&nbsp;personnel.<div><br></div><div><br></div>]]>
   </description>
   <pubDate>Sat, 24 Jul 2010 21:13:38 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/support-for-transparent-images_topic1514_post6758.html#6758</guid>
  </item> 
  <item>
   <title><![CDATA[Support for Transparent images : Hi Taher!Your questions are answered...]]></title>
   <link>http://www.quickpdf.org/forum/support-for-transparent-images_topic1514_post6757.html#6757</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=111">Ingo</a><br /><strong>Subject:</strong> 1514<br /><strong>Posted:</strong> 24 Jul 10 at 5:31PM<br /><br />Hi Taher!<br><br>Your questions are answered ...<br>So there's only our warm welcome for you<br>in this forum!<br>It's a user-user-forum here.<br>For special things you should contact the Debenu-guys (like Karl) directly.<br><br>Cheers, Ingo<br><br><br>]]>
   </description>
   <pubDate>Sat, 24 Jul 2010 17:31:03 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/support-for-transparent-images_topic1514_post6757.html#6757</guid>
  </item> 
  <item>
   <title><![CDATA[Support for Transparent images : Taher, we&amp;#039;ve answered directly...]]></title>
   <link>http://www.quickpdf.org/forum/support-for-transparent-images_topic1514_post6756.html#6756</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1003">deabrew</a><br /><strong>Subject:</strong> 1514<br /><strong>Posted:</strong> 24 Jul 10 at 2:53PM<br /><br /><span ="Apple-style-span" style="font-family: Verdana, Helvetica, Arial, sans-serif; line-height: normal; font-size: 14px; "><div><span ="Apple-style-span" style="font-family: Verdana, Helvetica, Arial, sans-serif; line-height: normal; font-size: 14px; ">Taher, we've answered directly via support with more detail. However, for those reading, a general summary of the comments are as follows:</span></div><div><span ="Apple-style-span" style="font-family: Verdana, Helvetica, Arial, sans-serif; line-height: normal; font-size: 14px; "><br></span></div><div><span ="Apple-style-span" style="font-family: Verdana, Helvetica, Arial, sans-serif; line-height: normal; font-size: 14px; ">_______________________________</span></div><div><span ="Apple-style-span" style="font-family: Verdana, Helvetica, Arial, sans-serif; line-height: normal; font-size: 14px; "><br></span></div><div><span ="Apple-style-span" style="font-family: Verdana, Helvetica, Arial, sans-serif; line-height: normal; font-size: 14px; ">a. Are transparent images supported?</span></div><div><span ="Apple-style-span" style="font-family: Verdana, Helvetica, Arial, sans-serif; line-height: normal; font-size: 14px; "><br></span></div>As you may be aware, there are a few different ways of specifying transparency in PNG images.<br><br>The Options parameter of the AddImageFromFile function has a few useful values for PNG images:<br><br>0 = Load the image as usual<br>1 = Load the alpha channel as a greyscale image<br>2 = Load the image and alpha channel (limit alpha to 8-bit)<br>3 = Load the image (limit image 8-bit/channel)<br>4 = Load the alpha channel (limit to 8-bit/channel)<br>5 = Load the image with alpha channel (limit both to 8-bit/channel)<br>6 = Load the image and alpha channel<br><br>You would need to select an option that includes both the image and the alpha channel, so that would be 2, 5 or 6.<br><br>The choice depends on the bit depth of your source images. Some PDF viewers/processors might not be able to handle 16-bit image data for the image and/or for the alpha channel. Option 5 would be the safest, option 6 would provide the best image quality if the source had 16-bit data, and option 2 is a trade off with the image data allowed to be 16-bit while forcing only the alpha channel to 8-bit if necessary.<br><br>Internally, QPL will separate the alpha channel and the image data and create two separate PDF image objects, linked with an SMask (soft mask) entry.<br><br>You can then continue to use the image drawing functions as usual and the transparent areas will come through automatically.<br><br>Here's a quick example:<br><br>QP.DrawLine(0, 0, QP.PageWidth, QP.PageHeight);<br>QP.AddImageFromFile("scfloral10.png", 2);<br>QP.DrawImage(0, QP.PageHeight, QP.PageWidth, QP.PageHeight);<br>QP.SaveToFile("scfloral10.pdf");<br><br></span><div><span ="Apple-style-span" style="font-family: Verdana, Helvetica, Arial, sans-serif; line-height: normal; font-size: 14px; ">______________</span></div><div><span ="Apple-style-span" style="font-family: Verdana, Helvetica, Arial, sans-serif; line-height: normal; font-size: 14px; "><br></span></div><div><span ="Apple-style-span" style="font-family: Verdana, Helvetica, Arial, sans-serif; line-height: normal; font-size: 14px; ">Transparency in GIF and TIFF images is not currently supported by QPL. We are constantly improving the image handling ability of the library but it's difficult to provide a time estimate for this.<br></span></div><div><span ="Apple-style-span" style="font-family: Verdana, Helvetica, Arial, sans-serif; line-height: normal; font-size: 14px; "><br></span></div><div><span ="Apple-style-span" style="font-family: Verdana, Helvetica, Arial, sans-serif; line-height: normal; font-size: 14px; ">______________</span></div><div><span ="Apple-style-span" style="font-family: Verdana, Helvetica, Arial, sans-serif; line-height: normal; font-size: 14px; "><br></span></div><div><span ="Apple-style-span" style="font-family: Verdana, Helvetica, Arial, sans-serif; line-height: normal; font-size: 14px; ">Regarding white/backgrounds -- i</span><span ="Apple-style-span" style="font-family: Verdana, Helvetica, Arial, sans-serif; line-height: normal; font-size: 14px; ">n your sample DesignCMYK.pdf file the existing image has a solid white background. So the trick is to set up a transparency mask on the original image first, and then draw the new image onto a new layer behind the existing page content.</span></div><div><span ="Apple-style-span" style="font-family: Verdana, Helvetica, Arial, sans-serif; line-height: normal; font-size: 14px; "><br>Here's a quick sample showing how this could be done:<br><br>// Load the original file<br>QP.LoadFromFile("DesignCMYK.pdf");<br><br>// Locate the existing image in the document<br>QP.FindImages;<br><br>// Select the found image<br>QP.SelectImage(QP.GetImageID(1));<br><br>// Set the image mask - white<br>QP.SetImageMaskCMYK(0, 0, 0, 0, 0, 0, 0, 0);<br><br>// Create a separate layer for the new image<br>QP.NewLayer;<br>QP.AddImageFromFile("scfloral10.png", 0);<br><br>// Draw the new image<br>QP.DrawImage(0, QP.PageHeight / 2, QP.PageWidth / 2, QP.PageHeight / 2);<br><br>// Move the new layer to the back<br>QP.MoveLayer(QP.LayerCount, 1);<br><br>// Save the combined file<br>QP.SaveToFile("DesignCMYK-out.pdf");</span></div><div><span ="Apple-style-span" style="font-family: Verdana, Helvetica, Arial, sans-serif; line-height: normal; font-size: 14px; "><br></span></div>]]>
   </description>
   <pubDate>Sat, 24 Jul 2010 14:53:33 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/support-for-transparent-images_topic1514_post6756.html#6756</guid>
  </item> 
  <item>
   <title><![CDATA[Support for Transparent images : Hi Guys,i have already sent this...]]></title>
   <link>http://www.quickpdf.org/forum/support-for-transparent-images_topic1514_post6747.html#6747</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.quickpdf.org/forum/member_profile.asp?PF=1349">Taher</a><br /><strong>Subject:</strong> 1514<br /><strong>Posted:</strong> 19 Jul 10 at 4:00PM<br /><br />Hi Guys,<div><br></div><div>i have already sent this email to support but in a hurry to get a quick answer therefore posting it here as well..</div><div><br></div><div><div>a)<span ="Apple-tab-span" style="white-space:pre">	</span>Are transparent images supported ?, we are using png files with its background being transparent, however when we load them and start drawing into the PDF, it somehow converts the transparency into a white or black background.&nbsp;</div><div><br></div><div>b)<span ="Apple-tab-span" style="white-space:pre">	</span>If its supported, can you please helps us with some code snippets. If it’s not supported , do you guys know if they plan to support it in the near future?, a time frame would really help us…?</div></div><div><br></div><div><br></div><div><br></div><div>Thanks</div><div>Regards</div><div>Taher</div><div><br></div><div><br></div><div><br></div><div><br></div>]]>
   </description>
   <pubDate>Mon, 19 Jul 2010 16:00:58 +0000</pubDate>
   <guid isPermaLink="true">http://www.quickpdf.org/forum/support-for-transparent-images_topic1514_post6747.html#6747</guid>
  </item> 
 </channel>
</rss>