Skip to content

An extension of Prawn that improves the performance when embedding PNG images containing an alpha channel

License

Notifications You must be signed in to change notification settings

nerds-and-company/prawn-fast-png

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prawn-fast-png

An extension of Prawn that improves the performance when embedding PNG images containing an alpha channel. Uses RMagick to separate RGB and alpha channels.

Usage

This gem doesn’t introduce any API changes, so please refer to Prawn’s RDoc.

require 'prawn'
require 'prawn/fast_png'

pdf = Prawn::Document.new
pdf.image 'dice.png'
pdf.render_file 'example.pdf'

Running Prawn’s tests

cd path_to_prawn_src
git tag # available versions
git checkout version.tag
# or
git checkout master
cd -
rake test PRAWN_DIR=path_to_prawn_src

for versions 0.5.1-0.8.3 add PRAWN_REQUIRE=prawn/core option

rake test PRAWN_DIR=path_to_prawn_src PRAWN_REQUIRE=prawn/core

GitHub

github.com/amberbit/prawn-fast-png

Mailing list

groups.google.com/group/prawn-ruby

Credits

prawn-fast-png is maintained by Wojciech Piekutowski, and is funded by AmberBit.

About

An extension of Prawn that improves the performance when embedding PNG images containing an alpha channel

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%