<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:clearspace="http://www.jivesoftware.com/xmlns/jive/rss" version="2.0">
  <channel>
    <title>Adobe Community: Message List - Indexed png transparency using /Mask</title>
    <link>https://forums.adobe.com/community/design_development/pdf_language_and_specifications?view=discussions</link>
    <description>Most recent forum messages</description>
    <language>en</language>
    <pubDate>Sun, 23 Feb 2014 14:13:38 GMT</pubDate>
    <generator>Jive Engage 7.0.0.1  (http://jivesoftware.com/products/)</generator>
    <dc:date>2014-02-23T14:13:38Z</dc:date>
    <dc:language>en</dc:language>
    <item>
      <title>Re: Indexed png transparency using /Mask</title>
      <link>https://forums.adobe.com/message/6148557?tstart=0#6148557</link>
      <description>&lt;!-- [DocumentBodyStart:d4fd4ae5-22cd-404c-a695-d66b659c97d5] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Yes, that's a chroma-key mask (where you pick one color from the possible color set).&amp;nbsp; You could also do a regular stencil mask, but that's the hard one.&amp;nbsp; SMask would be simpler since you could leave the palette in place but then make a full set in there - a definitely option if you are OK with adding transparency of that type to the document.&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:d4fd4ae5-22cd-404c-a695-d66b659c97d5] --&gt;&lt;img src='/beacon?t=1415903437221' /&gt;</description>
      <pubDate>Sun, 23 Feb 2014 14:13:38 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6148557?tstart=0#6148557</guid>
      <dc:date>2014-02-23T14:13:38Z</dc:date>
      <clearspace:dateToText>8 months 3 weeks ago</clearspace:dateToText>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: Indexed png transparency using /Mask</title>
      <link>https://forums.adobe.com/message/6148375?tstart=0#6148375</link>
      <description>&lt;!-- [DocumentBodyStart:8643ddb9-de4a-42c6-9573-efb78e3abaa9] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Great, thanks a lot. I'd started to make inroads with this yesterday and slowly came to the same conclusion you've helpfully now confirmed!&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I noticed yesterday that the majority of indexed PNG's i've come across usually only have an array of transparency values&amp;nbsp; consisting of a single 0 with the rest being 255. From looking at an existing&amp;nbsp; PDF generator, i realised that when that's the case, you can just pass a single value&amp;nbsp; (instead of the complete array) to add the /Mask to an image. With that value being the index of the position of the 0 within the PNG's transparency array. This works fine for the majority of indexed pngs that i've tested, as most only elect a single (pixel) colour within their palette to represent a fully transparent pixel and the rest are fully opaque.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;So if the PNG's tRN's values are as follows,&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;[255, 255, 255, 255, 255, 255, 0]&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;then the /Mask would be set as&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;/Mask [6, 6]&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;After getting this to work, i'd started to think about how this might work with multiple values with varying transparency values. But then realised that it would probably just be easier to unroll it and create an image and sMask.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Out of interest, do you know where i might look to find an example or explanation of how to apply the non-trivial solution? Is there anything within the PDF reference?&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:8643ddb9-de4a-42c6-9573-efb78e3abaa9] --&gt;</description>
      <pubDate>Sun, 23 Feb 2014 11:32:09 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6148375?tstart=0#6148375</guid>
      <dc:date>2014-02-23T11:32:09Z</dc:date>
      <clearspace:dateToText>8 months 3 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>1</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: Indexed png transparency using /Mask</title>
      <link>https://forums.adobe.com/message/6148131?tstart=0#6148131</link>
      <description>&lt;!-- [DocumentBodyStart:9c7f1fe6-b139-4b6b-968d-3bad15e8fbef] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;It's possible but it's not trivial, which is why most libraries just undo the palettization and use a full color image + mask.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The reason for the complexity is due to the differences between the way PNG encodes the data vs. how PDF does it.&amp;nbsp; So you will need to do some fancy tricks to get the data converted.&amp;nbsp; And it's much easier (and faster) to just undo the palettes.&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:9c7f1fe6-b139-4b6b-968d-3bad15e8fbef] --&gt;</description>
      <pubDate>Sun, 23 Feb 2014 06:12:20 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6148131?tstart=0#6148131</guid>
      <dc:date>2014-02-23T06:12:20Z</dc:date>
      <clearspace:dateToText>8 months 3 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>2</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: Indexed png transparency using /Mask</title>
      <link>https://forums.adobe.com/message/6145226?tstart=0#6145226</link>
      <description>&lt;!-- [DocumentBodyStart:f8fa8dfd-8fd7-49a9-818f-544c86959d64] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Your choice. But I don't need to understand PNG, only PDF. You have to convert PNG -&amp;gt; understood concept -&amp;gt; PDF. To start with I'd expect values in the range of 0 to 31, wouldn't you? That's what 32000-1 says for BitsPerComponent=4. &lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:f8fa8dfd-8fd7-49a9-818f-544c86959d64] --&gt;</description>
      <pubDate>Fri, 21 Feb 2014 23:36:39 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6145226?tstart=0#6145226</guid>
      <dc:date>2014-02-21T23:36:39Z</dc:date>
      <clearspace:dateToText>8 months 3 weeks ago</clearspace:dateToText>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: Indexed png transparency using /Mask</title>
      <link>https://forums.adobe.com/message/6145265?tstart=0#6145265</link>
      <description>&lt;!-- [DocumentBodyStart:cce2fcca-4c50-45b8-a1dc-980a14fc6f53] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;I appreciate your help, but if you don't understand PNG's, then you're probably not the best person to answer this question. It would take a while for me to fully explain the PNG spec to you.&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:cce2fcca-4c50-45b8-a1dc-980a14fc6f53] --&gt;</description>
      <pubDate>Fri, 21 Feb 2014 23:31:57 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6145265?tstart=0#6145265</guid>
      <dc:date>2014-02-21T23:31:57Z</dc:date>
      <clearspace:dateToText>8 months 3 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>1</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: Indexed png transparency using /Mask</title>
      <link>https://forums.adobe.com/message/6145223?tstart=0#6145223</link>
      <description>&lt;!-- [DocumentBodyStart:f9bffebd-c3ac-463b-bc01-66fffef419cf] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Let's go back. I'm not intimate with PNG. You say the transparency values for this PNG image are &lt;span class="arrayLeftBracket" style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;[&lt;/span&gt;&lt;span class="objectBox-number objectBox" style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;255&lt;/span&gt;&lt;span class="arrayComma" style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox" style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;255&lt;/span&gt;&lt;span class="arrayComma" style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox" style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;192&lt;/span&gt;&lt;span class="arrayComma" style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox" style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;192&lt;/span&gt;&lt;span class="arrayComma" style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox" style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;160&lt;/span&gt;&lt;span class="arrayComma" style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox" style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;160&lt;/span&gt;&lt;span class="arrayComma" style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox" style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;128&lt;/span&gt;&lt;span class="arrayComma" style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox" style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;128&lt;/span&gt;&lt;span class="arrayComma" style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox" style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;96&lt;/span&gt;&lt;span class="arrayComma" style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox" style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;96&lt;/span&gt;&lt;span class="arrayComma" style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox" style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;64&lt;/span&gt;&lt;span class="arrayComma" style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox" style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;64&lt;/span&gt;&lt;span class="arrayComma" style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox" style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;32&lt;/span&gt;&lt;span class="arrayComma" style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox" style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;32&lt;/span&gt;&lt;span class="arrayComma" style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox" style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;0&lt;/span&gt;&lt;span class="arrayComma" style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox" style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;0&lt;/span&gt;&lt;span class="arrayComma" style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;&lt;/span&gt;&lt;span class="arrayRightBracket" style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;]&lt;/span&gt;&amp;nbsp; but what does that actually mean? How many values are there and how to read them?&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:f9bffebd-c3ac-463b-bc01-66fffef419cf] --&gt;</description>
      <pubDate>Fri, 21 Feb 2014 23:25:18 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6145223?tstart=0#6145223</guid>
      <dc:date>2014-02-21T23:25:18Z</dc:date>
      <clearspace:dateToText>8 months 3 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>2</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: Indexed png transparency using /Mask</title>
      <link>https://forums.adobe.com/message/6145261?tstart=0#6145261</link>
      <description>&lt;!-- [DocumentBodyStart:ae6030e4-fe78-465d-a4b3-b79609046167] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Thanks, but i'm not sure i understand. Do you have an example of what you mean?&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I've followed through the logic of 3 seperate pdf libraries and all just strip the palette values and transparency values from a PNG's PLTE chunk and it's tRNS chunk and then apply them to the output to generate the pdf.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;They all have the same logic to output the trns properties as a /Mask property on the image object&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;var trns = '',&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;for (var i=0; i &amp;lt; img['trns'].length; i++)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trns += (img['trns'][i] + ' ' + img['trns'][i] + ' ');&lt;/p&gt;&lt;p&gt;out('/Mask [' + trns + ']');&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Which converts the input of,&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class="objectBox-array objectBox"&gt;&lt;span class="arrayLeftBracket"&gt;[&lt;/span&gt;&lt;span class="objectBox-number objectBox"&gt;255&lt;/span&gt;&lt;span class="arrayComma"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox"&gt;255&lt;/span&gt;&lt;span class="arrayComma"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox"&gt;192&lt;/span&gt;&lt;span class="arrayComma"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox"&gt;192&lt;/span&gt;&lt;span class="arrayComma"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox"&gt;160&lt;/span&gt;&lt;span class="arrayComma"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox"&gt;160&lt;/span&gt;&lt;span class="arrayComma"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox"&gt;128&lt;/span&gt;&lt;span class="arrayComma"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox"&gt;128&lt;/span&gt;&lt;span class="arrayComma"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox"&gt;96&lt;/span&gt;&lt;span class="arrayComma"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox"&gt;96&lt;/span&gt;&lt;span class="arrayComma"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox"&gt;64&lt;/span&gt;&lt;span class="arrayComma"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox"&gt;64&lt;/span&gt;&lt;span class="arrayComma"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox"&gt;32&lt;/span&gt;&lt;span class="arrayComma"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox"&gt;32&lt;/span&gt;&lt;span class="arrayComma"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox"&gt;0&lt;/span&gt;&lt;span class="arrayComma"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox"&gt;0&lt;/span&gt;&lt;span class="arrayComma"&gt;&lt;/span&gt;&lt;span class="arrayRightBracket"&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class="objectBox-array objectBox"&gt;&lt;span class="arrayRightBracket"&gt;to the output of&lt;br/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;/Mask [255 255 255 255 192 192 192 192 160 160 160 160 128 128 128 128 96 96 96 96 64 64 64 64 32 32 32 32 0 0 0 0 ]&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:ae6030e4-fe78-465d-a4b3-b79609046167] --&gt;</description>
      <pubDate>Fri, 21 Feb 2014 23:15:43 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6145261?tstart=0#6145261</guid>
      <dc:date>2014-02-21T23:15:43Z</dc:date>
      <clearspace:dateToText>8 months 3 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>3</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: Indexed png transparency using /Mask</title>
      <link>https://forums.adobe.com/message/6145092?tstart=0#6145092</link>
      <description>&lt;!-- [DocumentBodyStart:f734a940-0d8e-45c5-9844-22ce1405a758] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;I think you are making a step that the PDF reference doesn't say. The colour mask values are in reference to values in the image colour space. But the image colour space is Indexed; you seem to be treating it as if its underlying colour space was the actual colour space, if I read the repetition correctly. Your values will need to be in the range of image colorants.&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:f734a940-0d8e-45c5-9844-22ce1405a758] --&gt;</description>
      <pubDate>Fri, 21 Feb 2014 22:58:21 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6145092?tstart=0#6145092</guid>
      <dc:date>2014-02-21T22:58:21Z</dc:date>
      <clearspace:dateToText>8 months 3 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>4</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Indexed png transparency using /Mask</title>
      <link>https://forums.adobe.com/message/6144954?tstart=0#6144954</link>
      <description>&lt;!-- [DocumentBodyStart:51e669f1-2b59-4d0d-beb7-756e68bc28dd] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Hi,&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;is it possible to use an indexed png's palette and accompanying transparency data to display a masked image? I've seen enough evidence in other opensource pdf libraries&amp;nbsp; to suggest that it's possible, but am having trouble getting it working myself.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The indexed PNG's i've tested all contain an array of&amp;nbsp; palette data and an associated array of transparency values.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I'm able to successfully display the png in a pdf, when only using it's palette and excluding the transprancy. The transparent parts of the image are displayed as black, as expected . The outuput is,&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;17 0 obj&lt;/p&gt;&lt;p&gt;&amp;lt;&amp;lt;/Type /XObject&lt;/p&gt;&lt;p&gt;/Subtype /Image&lt;/p&gt;&lt;p&gt;/Width 16&lt;/p&gt;&lt;p&gt;/Height 16&lt;/p&gt;&lt;p&gt;/ColorSpace [/Indexed /DeviceRGB 15 18 0 R]&lt;/p&gt;&lt;p&gt;/BitsPerComponent 4&lt;/p&gt;&lt;p&gt;/Filter /FlateDecode&lt;/p&gt;&lt;p&gt;/DecodeParms &amp;lt;&amp;lt;/Predictor 15 /Colors 1 /BitsPerComponent 4 /Columns 16&amp;gt;&amp;gt;&lt;/p&gt;&lt;p&gt;/Length 155&amp;gt;&amp;gt;&lt;/p&gt;&lt;p&gt;stream&lt;/p&gt;&lt;p&gt;--------------- BINARY IMAGE DATA ---------------&lt;/p&gt;&lt;p&gt;endstream&lt;/p&gt;&lt;p&gt;endobj&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;18 0 obj&lt;/p&gt;&lt;p&gt;&amp;lt;&amp;lt; /Length 48&amp;gt;&amp;gt;&lt;/p&gt;&lt;p&gt;stream&lt;/p&gt;&lt;p&gt;--------------- PALETTE ARRAY VALUES AS BINARY ---------------&lt;/p&gt;&lt;p&gt;endstream&lt;/p&gt;&lt;p&gt;endobj&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;But as soon as i try an add the transparency array, nothing gets displayed and i get an error when opening the pdf that says 'An error exists on this page'. The transparency values for the indexed image are as follows,&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class="objectBox-array objectBox"&gt;&lt;span class="arrayLeftBracket"&gt;[&lt;/span&gt;&lt;span class="objectBox-number objectBox"&gt;255&lt;/span&gt;&lt;span class="arrayComma"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox"&gt;255&lt;/span&gt;&lt;span class="arrayComma"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox"&gt;192&lt;/span&gt;&lt;span class="arrayComma"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox"&gt;192&lt;/span&gt;&lt;span class="arrayComma"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox"&gt;160&lt;/span&gt;&lt;span class="arrayComma"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox"&gt;160&lt;/span&gt;&lt;span class="arrayComma"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox"&gt;128&lt;/span&gt;&lt;span class="arrayComma"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox"&gt;128&lt;/span&gt;&lt;span class="arrayComma"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox"&gt;96&lt;/span&gt;&lt;span class="arrayComma"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox"&gt;96&lt;/span&gt;&lt;span class="arrayComma"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox"&gt;64&lt;/span&gt;&lt;span class="arrayComma"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox"&gt;64&lt;/span&gt;&lt;span class="arrayComma"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox"&gt;32&lt;/span&gt;&lt;span class="arrayComma"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox"&gt;32&lt;/span&gt;&lt;span class="arrayComma"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox"&gt;0&lt;/span&gt;&lt;span class="arrayComma"&gt;, &lt;/span&gt;&lt;span class="objectBox-number objectBox"&gt;0&lt;/span&gt;&lt;span class="arrayComma"&gt;&lt;/span&gt;&lt;span class="arrayRightBracket"&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class="objectBox-array objectBox"&gt;&lt;span class="arrayRightBracket"&gt;I've followed the spec, 8.9.6.4 Colour Key Masking, although i'm not sure if there should be a difference between 'min' and 'max' or whether it's just the same value duplicated? From the logic i've seen in other pdf generation libraries, it appears to be the latter.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class="objectBox-array objectBox"&gt;&lt;span class="arrayRightBracket"&gt;This is the non working output i get, when attempting to use the above array of transparency values as a mask,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="objectBox-array objectBox"&gt;&lt;span class="arrayRightBracket"&gt;&lt;br/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;17 0 obj&lt;/p&gt;&lt;p&gt;&amp;lt;&amp;lt;/Type /XObject&lt;/p&gt;&lt;p&gt;/Subtype /Image&lt;/p&gt;&lt;p&gt;/Width 16&lt;/p&gt;&lt;p&gt;/Height 16&lt;/p&gt;&lt;p&gt;/ColorSpace [/Indexed /DeviceRGB 15 18 0 R]&lt;/p&gt;&lt;p&gt;/BitsPerComponent 4&lt;/p&gt;&lt;p&gt;/Filter /FlateDecode&lt;/p&gt;&lt;p&gt;/DecodeParms &amp;lt;&amp;lt;/Predictor 15 /Colors 1 /BitsPerComponent 4 /Columns 16&amp;gt;&amp;gt;&lt;/p&gt;&lt;p&gt;/Mask [255 255 255 255 192 192 192 192 160 160 160 160 128 128 128 128 96 96 96 96 64 64 64 64 32 32 32 32 0 0 0 0 ]&lt;/p&gt;&lt;p&gt;/Length 155&amp;gt;&amp;gt;&lt;/p&gt;&lt;p&gt;stream&lt;/p&gt;&lt;p&gt;--------------- BINARY IMAGE DATA&amp;nbsp; ---------------&lt;/p&gt;&lt;p&gt;endstream&lt;/p&gt;&lt;p&gt;endobj&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;18 0 obj&lt;/p&gt;&lt;p&gt;&amp;lt;&amp;lt; /Length 48&amp;gt;&amp;gt;&lt;/p&gt;&lt;p&gt;stream&lt;/p&gt;&lt;p&gt;--------------- PALETTE ARRAY VALUES AS BINARY ---------------&lt;/p&gt;&lt;p&gt;endstream&lt;/p&gt;&lt;p&gt;endobj&lt;/p&gt;&lt;p&gt;&lt;span class="objectBox-array objectBox"&gt;&lt;span class="arrayRightBracket"&gt;&lt;br/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:51e669f1-2b59-4d0d-beb7-756e68bc28dd] --&gt;</description>
      <pubDate>Fri, 21 Feb 2014 22:12:11 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6144954?tstart=0#6144954</guid>
      <dc:date>2014-02-21T22:12:11Z</dc:date>
      <clearspace:dateToText>8 months 3 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>8</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
  </channel>
</rss>

