wvanbergen/oily_png — pull request #14 by jappelbe (2014-10-23 10:23:52+00:00)
Title: Added c extensions for Canvas#rotate_left! and Canvas#rotate_right!

The ChunkyPNG rotation methods are very expensive as they use dynamic arrays for pixels. I implemented the Canvas#rotate_left! and Canvas#rotate_right! in C.

Unittests were copied from ChunkyPNG.

performance improvement:
01.png (727x233): 0.196s vs 0.003s
10.png (6300x3000): 97.869s vs 0.434s
See https://github.com/jappelbe/oily_png/blob/rotation_benchmark/lib/rotation_benchmark.rb for benchmark script and more results