sábado, 28 de mayo de 2011

Released ImageRuby-Devil - a bridge between ImageRuby and Devil image library

ImageRuby-devil is the bridge between ImageRuby and Devil image library, it adds a group of new features to ImageRuby which are based on devil features:
  • Load and save image formats supported by devil library including jpg, tga, png, etc...
  • New image operations including "alienify", "blur" and "contrast"
The development, release and usage of this gem was predicted in the first ImageRuby release announcement

Install the gem


In the command line, execute:
  1. gem install imageruby-devil  

Example

  1. # is not necessary to make a explicit require of imageruby-devil  
  2. require "imageruby"  
  3.   
  4. image = ImageRuby::Image.from_file("input.jpg"# now, jpg files can be loaded  
  5.   
  6. image.color_replace!(Color.black, Color.purple) # use a method of ImageRuby  
  7. image.blur(1) # use a method of added by imageruby-devil  
  8.   
  9. image.save("output.png":png# save (and load) in png format is now supported  

Links:

ImageRuby-devil at github: https://github.com/tario/imageruby-devil
ImageRuby at github: https://github.com/tario/imageruby
ImageRuby-bmp-c: https://github.com/tario/imageruby-bmp-c
Devil image library official site: http://openil.sourceforge.net/