This pure Ruby library can read and write PNG images without depending on an external image library, like RMagick. It tries to be memory efficient and reasonably fast. It supports reading and writing all PNG variants that are defined in the specification, with one limitation: only 8-bit color depth is supported. It supports all transparency, interlacing and filtering options the PNG specifications allows. It can also read and write textual metadata from PNG files. Low-level read/write access to PNG chunks is also possible. This library supports simple drawing on the image canvas and simple operations like alpha composition and cropping. Finally, it can import from and export to RMagick for interoperability. Also, have a look at OilyPNG at OilyPNG is a drop in mixin module that implements some of the ChunkyPNG algorithms in C, which provides a massive speed boost to encoding and decoding.

installgem install chunky_png -v 1.3.1

Willem van Bergen

7,554,433 total downloads 1,276,970 for this version




gem 'chunky_png', '~> 1.3.1'
  1. 1.3.3 October 24, 2014 (338 KB)
  2. 1.3.2 October 18, 2014 (337 KB)
  3. 1.3.1 April 28, 2014 (335 KB)
  4. 1.3.0 February 10, 2014 (311 KB)
  5. 1.2.9 October 17, 2013 (309 KB)
Show all versions (55 total)
Ruby Dependency
  1. >= 0
Development Dependencies
  1. rake >= 0
  2. rspec ~> 2.2