The file documents the changes to this library over the different versions.
-
ChunkyPNG uses semantic versioning. This means that the public API will not change except for major versions.
-
Please add an entry to the “Unreleased changes” section in your pull requests, so I can move them into a numbered version section on release.
-
Add compatibility for Ruby 3.0.
-
Fix Canvas#inspect to not modify frozen string literal.
-
Add
frozen-string-literal: true
to all source files. -
Remove some backfills that were needed only for Ruby 1.8 compatibility.
-
Implemented
ChunkyPNG::Dimension#hash
to fix some specs after a behavior change in RSpec.
-
Updated project metadata as published on Rubygems.org
-
Fixed a regression in Datastream#metadata, which was not able to deal with iTXt chunks.
-
Add support for reading and writing an international textual data (iTXt chunks).
-
Add support for reading and writing an image’s physical dimension (pHYs chunks).
-
Performance improvement for
Color.euclidean_distance_rgba
. -
Bugfix in decoding transparent pixels when decoding multiple images in a row.
-
Allow reading images from streams that have trailing data after the IEND chunk.
-
Add compatibility for Ruby 2.3’s frozen string literals.
-
Documentation updates and small cleanups.
-
Performance improvements for
Canvas#crop!
andImageData.combine_chunks
-
Update
chunky_png/rmagick
to work with the latest versions of RMagick. -
Bugfix in
Color#from_hsl
andColor#from_hsv
when hue value is 360. -
Fix encoding issue in
Datastream#to_blob
-
Assert compatibility with Ruby 2.2
-
Improved documentation using RDoc, so it is included on www.rubydoc.info/gems/chunky_png
-
Update chunkypng.com website; migrate some stuff from the wiki.
-
Improve performance of
Canvas#crop
andCanvas#crop!
by doing less memory allocations. -
Update to RSPEC 3
-
Add CONTRIBUTING.rdoc file.
-
Add HSV/HSL color conversions:
Color.from_hsl
,Color.to_hsl
-
Allow empty IDAT chunks to better conform to the PNG standard.
-
Small bugfix in image resampling.
-
Documentation and code readability improvements.
-
Improve performance of
Palette.from_canvas
. -
Add
Color.euclidean_distance_rgba
to compare colors. -
Bugix in
Canvas.from_bgr_stream
. -
Documentation and code readibility improvements.
-
README updates, include mention of screencast.
-
Add support for parsing color that use three-hex notation. (e.g.
#aaa
instead of#aaaaaa
) -
Add
Canvas#border!
andCanvas#border
to draw a border around a canvas. -
Add
Canvas#trim!
andCanvas#trim
to trim a border from a canvas.
-
Set license in chunky_png.gemspec for better discoverability.
-
Improve error messages for
Canvas#crop
. -
Use better gem release management tasks from bundler.
-
Ruby 2.0 compatibility.
-
Fixed some encoding issues on JRuby.
-
Update Travis CI configuration to test on more Ruby versions.
-
Small PNG decoding performnace improvements by using bitwise math.
-
Add decompression bomb security warning to README.
-
Fix RMagick loading issue on case sensitive filesystems.
-
Some compatibility fixes for the upcoming Ruby 2.0.
-
Allow more data-url notations for
ChunkyPNG::Canvas.from_data_url
.
-
Edge case bugfix in
Color.decompose_alpha_component
that could get triggered in thechange_theme_color!
method.
-
Added data URL importing
Canvas.from_data_url
.
-
Added data URL exporting
Canvas#to_data_url
to easily use PNGs inline in CSS or HTML.
-
Workaround for performance bug in REE.
-
Added bicubic resampling of images.
-
Update resampling code to use integer math instead of floating points.
-
Properly read PNG files with a tRNS chunk in color mode 0 (grayscale) or 2 (true color).
-
Added
Color.to_grayscale
andCanvas#grayscale!
to convert colors and canvases to grayscale. -
Memory footprint improvement of
Canvas#resample!
-
Added
Canvas#to_alpha_channel_bytes
andCanvas#to_grayscale_stream
to export raw pixel data. -
Spec suite cleanup
-
Add bezier curve drawing:
Canvas#bezier_curve
. -
RDoc fixes & improvements.
-
Performance improvements.
There are some API changes for this release. If you are using Canvas#compose
or Canvas#replace
, these methods will no longer operate in place, but will return a new canvas instance instead. The in place versions have been renamed to compose!
and replace!
to be more consistent with the rest of the API.
-
Added image resampling using the nearest neighbor algorithm:
Canvas#resample
. -
Added circle and polygon drawing methods:
Canvas#circle
andCanvas#polygon
. -
Added in place version of
Canvas#crop
,Canvas#rotate_180
,Canvas#flip_horizontally
andCanvas#flip_vertically
. Just add a bang to the method name (e.g.Canvas#crop!
) and it will change the current canvas instead of returning a new one. These implementations are also more memory and CPU efficient. -
Added geometry helper classes:
ChunkyPNG::Point
,ChunkyPNG::Dimension
andChunkyPNG::Vector
. -
Added a list of HTML named colors. Get them by calling
ChunkyPNG::Color(:teal)
orChunkyPNG::Color('red @ 0.8')
-
Added encoding support for 1-, 2-, and 4-bit grayscale images.
-
Cleaned up auto-detection of color mode settings. It will now choose 1 bit grayscale mode if an image only contains black and white. (The other low bitrate grayscale modes are never chosen automatically.)
-
RDoc improvements. See rdoc.info/gems/chunky_png.
-
ChunkyPNG is now also tested on Ruby 1.8.6.
-
Added support for encoding indexed images with a low bitrate. It will automatically use less bits per pixel if possible.
-
Improved testing setup. ChunkyPNG is now tested on Ruby 1.8.7, 1.9.2, JRuby and Rubinius.
-
Decoding of 1, 2 and 4 bit indexed color images.
-
Decoding of 1, 2 and 4 bit grayscale images.
-
Decoding 16 bit images. The extra bits will be discarded, so the image will be loaded as 8 bit.
-
Used the official PNG suite to build a more complete test suite.
-
Bugfix: allow 256 instead of 255 colors for indexed images.
-
Improved handling of binary encoding for strings in Ruby 1.9.
-
Small fix to make grayscale use the B byte consistently.
-
Another small fix for OilyPNG compatibility
-
Small fix for OilyPNG compatibility
-
Refactored decoding and encoding to work on binary strings instead of arrays of integers. This gives a nice speedup and uses less memory. Thanks to Yehuda Katz for the idea.
-
Fixed an issue with interlaced images.
-
Fixed image metadata issue when duplicating images.
-
Added
flip_horizontally
,flip_vertically
,rotate_left
,rotate_right
androtate_180
toChunkyPNG::Canvas
. -
Now raises
ChunkyPNG::OutOfBounds
exceptions when referencing coordinates outside the image bounds. -
Added Gemfile for development dependency management.
-
Added
ChunkyPNG::Image#rect
to draw simple rectangles. -
Fixed composing a transparent color on a fully transparent background.
-
Based on the suggestion of [Dirkjan Bussink](github.com/dbussink), introduced custom exception classes:
-
ChunkyPNG::SignatureMismatch
is raised when the PNG signature could not be found. Usually this means the the file is not a PNG image. -
ChunkyPNG::CRCMismatch
is raised when the a CRC check for a chunk in the PNG file fails. -
ChunkyPNG::NotSupported
is raised when the PNG image uses a feature that ChunkyPNG does not support. -
ChunkyPNG::ExpectationFailed
is raised when a required expectation failed.
-
-
Some fixes for 32-bit systems.
-
Added
:best_compression
saving routine to allow creating the smallest images possible. -
Added option to control Zlib compression level while saving.
-
Added methods to easily create different color variants of an image with a color theme. See [[Images with a color theme]] for more information.
-
Ruby 1.8.6 compatibility fixes
-
Improved API documentation.
-
Added alpha decomposition to extract a color mask from a themed image.
-
Improved API documentation.
-
Added
point
andline
anti-aliased drawing functions.
-
Removed last occurrences of floating math to speed up the library.
-
Added importing of ABGR and BGR streams.
-
Added exporting an image as ABGR stream.
-
Ruby 1.9 compatibility fixes.
-
Improved speed of PNG decoding.
-
Bugfix in average scanline decoding filter.
-
Added
:fast_rgba
and:fast_rgb
saving routines, which yield a 1500% speedup when saving an image.
-
Complete rewrite of the earlier versions, now including awesomeness and unicorns.