From 823df34f35344e7affec516ec6adbf7873c0716a Mon Sep 17 00:00:00 2001 From: Alexander Mankuta Date: Sat, 21 Nov 2015 23:09:57 +0200 Subject: [PATCH 1/2] Added support for transparency in indexed PNG images --- data/images/indexed_transparency.png | Bin 0 -> 494 bytes data/images/indexed_transparency_alpha.dat | Bin 0 -> 253 bytes data/images/indexed_transparency_color.dat | Bin 0 -> 206 bytes data/images/pal_bk.png | Bin 1152 -> 0 bytes lib/prawn/images/png.rb | 45 ++++++++++++++++++--- spec/png_spec.rb | 30 ++++++++++++-- 6 files changed, 66 insertions(+), 9 deletions(-) create mode 100644 data/images/indexed_transparency.png create mode 100644 data/images/indexed_transparency_alpha.dat create mode 100644 data/images/indexed_transparency_color.dat delete mode 100644 data/images/pal_bk.png diff --git a/data/images/indexed_transparency.png b/data/images/indexed_transparency.png new file mode 100644 index 0000000000000000000000000000000000000000..12656481ac23279da81f0c3e432de5d228372c24 GIT binary patch literal 494 zcmeAS@N?(olHy`uVBq!ia0vp^CqS5k8A#4*i(3PvSkfJR9T^xl_H+M9WCijSl0AZa z85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d9Oz#v{QXIG#NP=Y_eC&cwX0|Ns6|9_(J z-*=!Cb4ie2@cw#xt*xdYE@P6ny9-Ny#?3$=hqJ&VvY3H^TNs2H8D`Cq01BS=ba4!+ zxb^ltqhNyr!{H6=f2!Ts_D}7<}ZM?Cb7WJx}oY>xTMFm&+Z?1bvlfxta84NL@5p kL|DM`dk67~;l|CKc%M9N*)F6w4r1TgGbgzBLHH0 zz{CR#f1oEC7#RLD{9iir`W>Lqfs!Dge)104+&1sMqu0Uiz(1_u`ppMa2vn1qy! zoPv^ynueB+o(WTC%vrEx#hMLUcI-KDPp|}3va|b5_{lb{!?e20!gh%=zkS*-#;uumfC)vV>`#`}D2ALbTZ{CWCj*OZy zd*&<&X-TOUuV22($j;1Kv3lhy4Q)-W6Q@s}^6>Wb>gew5;^5}wGB7YQ+`M7a#^Qpa z!p|Q*eLQ?{#mdFY`es>Wy#g^Vow?Fn5D*_89UL1P85kE96%-Q^F=77n*^}o^ojGyd zv{{qpOqn4dFD@-CD=H}{CnhB%BO>wO{qxt4-#&f$@ZGalkKR0a!N87WV&5z;<6!=S z2mjSpe}8jtYw_`KxzXEm?rkYN{Hrwk`kJ_{MMpoSdQaDh+fs1wPi67*GxJP~kA2Au zUhXr`q|m88KHtAQJl(xII@`NAIGI_d2j)_cleNzJEM;Y2=z4$p@F~{$>A Date: Sun, 22 Nov 2015 13:25:41 +0200 Subject: [PATCH 2/2] Added Changelog entry for indexed PNG transparency [skip ci] --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd8b2bc82..ef6c52cfa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ ## PrawnPDF master branch +### Added support for PNG images with indexed transparency + +Prawn now properly hadles transparency in PNG images with indexed color. + +(Maciej Mucha, [#783](https://github.com/prawnpdf/prawn/issues/783); Alexander Mankuta, [#920](https://github.com/prawnpdf/prawn/pull/920)) + ### Prawn no longer generates IRB warnings Fix a few issues with code style that were triggering warnings in IRB when run in verbose mode (`irb -w`).