Bug 73901

Summary: pdftocairo sets image background to black instead of white/transparent
Product: cairo Reporter: Alex Korobkin <korobkin+lpad>
Component: generalAssignee: Chris Wilson <chris>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 68382    
Attachments: transparent.pdf
transparent-cairo.ps
transparent-ps.ps

Description Alex Korobkin 2014-01-21 21:59:18 UTC
Created attachment 92547 [details]
transparent.pdf

There is a semi-transparent image in the attached PDF "transparent.pdf". 

When converted with pdftocairo 0.24.5 based on cairo 1.12.16 with all the recent patches from master branch, pdftocairo -ps -level3 transparent.pdf transparent-cairo.ps, we get unexpected black background on that image. 

When converted with pdftops 0.24.5, pdftops -level3 transparent.pdf transparent-ps.ps, background is rendered properly, white. 


transparent.pdf, transparent-cairo.ps, and transparent-ps.ps are attached.
Comment 1 Alex Korobkin 2014-01-21 21:59:33 UTC
Comment on attachment 92547 [details]
transparent.pdf

>%PDF-1.5
>%µí®û
>3 0 obj
><< /Length 4 0 R
>   /Filter /FlateDecode
>>>
>stream
>x}Ë; EÑ~Vñ6 ÈgíݵÒiÆå+±2æ¶çfÈä­ ~T,`çu]QeÅýOû*VIÐKT¿.C»6ÊÐo}L"EºÆù!&
>endstream
>endobj
>4 0 obj
>   98
>endobj
>2 0 obj
><<
>   /ExtGState <<
>      /a0 << /CA 1 /ca 1 >>
>      /s5 5 0 R
>   >>
>   /XObject << /x6 6 0 R >>
>>>
>endobj
>7 0 obj
><< /Type /Page
>   /Parent 1 0 R
>   /MediaBox [ 0 0 611.999983 791.999983 ]
>   /Contents 3 0 R
>   /Group <<
>      /Type /Group
>      /S /Transparency
>      /CS /DeviceRGB
>   >>
>   /Resources 2 0 R
>>>
>endobj
>8 0 obj
><< /Type /XObject
>   /Length 62
>   /Filter /FlateDecode
>   /Subtype /Form
>   /BBox [ 0 0 611.999983 791.999983 ]
>   /Group <<
>      /Type /Group
>      /S /Transparency
>      /CS /DeviceRGB
>   >>
>   /Resources
><<
>   /ExtGState <<
>      /a0 << /CA 1 /ca 1 >>
>   >>
>   /Pattern << /p9 9 0 R >>
>>>
>>>
>stream
>x+TÐH,)I-ÊSH.VÐ/°T(NÎSÐO4PH/æ2P0P034Ô³csK8³(U!+~ª
>endstream
>endobj
>6 0 obj
><< /Type /XObject
>   /Length 63
>   /Filter /FlateDecode
>   /Subtype /Form
>   /BBox [ 0 0 611.999983 791.999983 ]
>   /Group <<
>      /Type /Group
>      /S /Transparency
>      /CS /DeviceRGB
>   >>
>   /Resources
><<
>   /ExtGState <<
>      /a0 << /CA 1 /ca 1 >>
>   >>
>   /Pattern << /p10 10 0 R >>
>>>
>>>
>stream
>x+TÐH,)I-ÊSH.VÐ/04P(NÎSÐO4PH/æ2P0P034Ô³csK8³(U!++3Ò
>endstream
>endobj
>11 0 obj
><< /Type /Mask
>   /S /Alpha
>   /G 8 0 R
>>>
>endobj
>5 0 obj
><< /Type /ExtGState
>   /SMask 11 0 R
>   /ca 1
>   /CA 1
>   /AIS false
>>>
>endobj
>9 0 obj
><< /Length 13 0 R
>   /PatternType 1
>   /BBox [0 0 85 62]
>   /XStep 1972
>   /YStep 1972
>   /TilingType 1
>   /PaintType 1
>   /Matrix [ 0.769459 0 0 0.76946 42.745097 701.862114 ]
>   /Resources << /XObject << /x12 12 0 R >> >>
>>>
>stream
> q 85 0 0 62 0 0 cm /x12 Do Q 
>
>endstream
>endobj
>13 0 obj
>   31
>endobj
>10 0 obj
><< /Length 15 0 R
>   /PatternType 1
>   /BBox [0 0 85 62]
>   /XStep 1972
>   /YStep 1972
>   /TilingType 1
>   /PaintType 1
>   /Matrix [ 0.769459 0 0 0.76946 42.745097 701.862114 ]
>   /Resources << /XObject << /x14 14 0 R >> >>
>>>
>stream
> q 85 0 0 62 0 0 cm /x14 Do Q 
>
>endstream
>endobj
>15 0 obj
>   31
>endobj
>16 0 obj
><< /Length 17 0 R
>   /Filter /FlateDecode
>   /Type /XObject
>   /Subtype /Image
>   /Width 85
>   /Height 62
>   /ColorSpace /DeviceGray
>   /BitsPerComponent 8
>>>
>stream
>xûÿ¶àÏ/Þ¼xòàÎ+Î8r`Ï-Ö¬X²`Î)z:Zj*J
>r2Rb"B|<\l,Lt4Td$Dx8Xà`ÔÐQCG
5tÔÐQCG
5tÔÐQCG
5tÔÐQCG
5tÔÐQCG
PC©A?Ù
>endstream
>endobj
>17 0 obj
>   128
>endobj
>12 0 obj
><< /Length 18 0 R
>   /Filter /FlateDecode
>   /Type /XObject
>   /Subtype /Image
>   /Width 85
>   /Height 62
>   /ColorSpace /DeviceRGB
>   /Interpolate true
>   /BitsPerComponent 8
>   /SMask 16 0 R
>>>
>stream
>xíÁ1 õOm	O ø=Â
>endstream
>endobj
>18 0 obj
>   38
>endobj
>14 0 obj
><< /Length 19 0 R
>   /Filter /FlateDecode
>   /Type /XObject
>   /Subtype /Image
>   /Width 85
>   /Height 62
>   /ColorSpace /DeviceRGB
>   /Interpolate true
>   /BitsPerComponent 8
>>>
>stream
>xíÏ1kqÆqk¯ÖÚ«½Ú«½Ú«½Ú«½Ú«½Ú«½Ú«=	$H A	$H á?888888888888888888888888888888í;Èúü}y^ÀóA:Úíílø¸?`÷!àãþ1|Ü0ûÆðqÀ>îCÀÇýcø¸?`_§Óºcooý¹Ü5ý}}íËd~]])éôÏËKo*õãâBN&¿{oggR<þõôÔ}99£ÑÏÇÇ®HäÓÑ<<tBø`ðýþ¾#x··ÇiÚ[¿ß®ªo|>VQ^{½6Y~åñ0ôÒí¶âçN§ç9Ç=µÛÍ,ûÄf#æ±Õj¢éG¢Í|`2Fã}AO÷ôzàøÀ>ð|àøÀ>ð|à§øÿîl»Ýn6õz½Z­Ëåb±Ïç³Ùl:N&ñx<Ãá`0è÷û½^¯Ûív:v»ÝjµÍf£Ñ¨×ëµZ­Z­V*r¹\*Åb¡PÈçó¡\.Íf3L:N¥RÉd2HÄãñX,F#H8BÁ`0h¦ªª¢(²,K$¢ <ÏsDz,Ã04MSE¤Ñh$øÀ>ð|àøÀ>ð|àøÀß)þ.ï?[Vû
>endstream
>endobj
>19 0 obj
>   556
>endobj
>1 0 obj
><< /Type /Pages
>   /Kids [ 7 0 R ]
>   /Count 1
>>>
>endobj
>20 0 obj
><< /Creator (cairo 1.10.2 (http://cairographics.org))
>   /Producer (cairo 1.10.2 (http://cairographics.org))
>>>
>endobj
>21 0 obj
><< /Type /Catalog
>   /Pages 1 0 R
>>>
>endobj
>xref
>0 22
>0000000000 65535 f 
>0000003525 00000 n 
>0000000211 00000 n 
>0000000015 00000 n 
>0000000190 00000 n 
>0000001385 00000 n 
>0000000932 00000 n 
>0000000327 00000 n 
>0000000541 00000 n 
>0000001472 00000 n 
>0000001785 00000 n 
>0000001326 00000 n 
>0000002443 00000 n 
>0000001763 00000 n 
>0000002733 00000 n 
>0000002077 00000 n 
>0000002099 00000 n 
>0000002420 00000 n 
>0000002711 00000 n 
>0000003502 00000 n 
>0000003590 00000 n 
>0000003718 00000 n 
>trailer
><< /Size 22
>   /Root 21 0 R
>   /Info 20 0 R
>>>
>startxref
>3771
>%%EOF
Comment 2 Alex Korobkin 2014-01-21 22:02:44 UTC
Created attachment 92548 [details]
transparent-cairo.ps

converted with pdftocairo
Comment 3 Alex Korobkin 2014-01-21 22:03:07 UTC
Created attachment 92549 [details]
transparent-ps.ps

created with pdftops
Comment 4 Adrian Johnson 2014-01-22 10:13:10 UTC
Works with cairo 1.12.2. Fails with cairo master.
Comment 5 Adrian Johnson 2014-01-22 10:17:01 UTC
I get the same problem with SVG output. Works in 1.12.2, fails with master. This points to a bug in the recording surface.
Comment 6 Alex Korobkin 2014-01-31 22:08:48 UTC
Does it mean the bug needs to be filed elsewhere, or is it Cairo issue?
Comment 7 Adrian Johnson 2014-01-31 22:43:54 UTC
It is a cairo bug.
Comment 8 Bryce Harrington 2015-06-26 01:43:27 UTC
Likely a dupe of bug #73038

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.