Sha256: 98656bb6267b06af343bbf91b6f427f5b45f204d0a98b04a12ed8cb4167f0fcd
Contents?: true
Size: 1.98 KB
Versions: 3
Compression:
Stored size: 1.98 KB
Contents
= Chunky PNG This library can read and write PNG files. It is written in pure Ruby for maximum portability. Let me rephrase: it does NOT require RMagick or any other memory leaking image library. Source code:: http://github.com/wvanbergen/chunky_png/tree RDoc:: http://rdoc.info/projects/wvanbergen/chunky_png Wiki:: http://wiki.github.com/wvanbergen/chunky_png Issue tracker:: http://github.com/wvanbergen/chunky_png/issues == Features * Decodes almost any image that the PNG standard allows, except for images that use a different color depth than 8 bits. This includes all standard color modes and all transparency, interlacing and filtering options. * Encodes images supports all color modes (true color, grayscale and indexed) and transparency for all these color modes. The best color mode will be chosen automatically, based on the image's colors. * R/W access to the image's pixels. * R/W access to all image metadata that is stored in chunks. == Classes The main classes used within ChunkyPNG are: <tt>ChunkyPNG::Image</tt> :: create PNG images from scratch or based on another PNG image. <tt>ChunkyPNG::Datastream</tt> :: low-level read and write access to PNG images from or to a file or stream. <tt>ChunkyPNG::PixelMatrix</tt> :: represents an images as a matrix of pixels. <tt>ChunkyPNG::Pixel</tt> :: represents a single pixel or color value. == Usage require 'chunky_png' # Creating an image from scratch png = ChunkyPNG::Image.new(16, 16, ChunkyPNG::Pixel::TRANSPARENT) png[1,1] = ChunkyPNG::Pixel.rgba(255, 255, 255, 128) png[2,1] = ChunkyPNG::Pixel.rgba(255, 255, 255, 128) png.save('filename.png') # Modify an image - TODO # Inspecting metadata - TODO (Note: this is subject to change while work is in progress) == About The library is written by Willem van Bergen for Floorplanner.com, and released under the MIT license (see LICENSE). Please contact me for questions or remarks. Patches are greatly appreciated! :-) P.S.: _why is why this library is so chunky.
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
chunky_png-0.0.5 | README.rdoc |
chunky_png-0.0.4 | README.rdoc |
chunky_png-0.0.3 | README.rdoc |