ImageRuby-Devil - Bridge between ImageRuby and Devil image library

Implements a set of features for ImageRuby using Devil image library (github.com/banister/devil)

  • Support to load and save formats supported by devil library including jpg, tga, png, etc…

  • New image operations: “alienify”, “blur”, “contrast”, “edge_detect”, “enboss”, “equalize”, “flip”,

    "gamma_correct", "mirror", "negate", "nosify", "rotate", "sharpen", "to_blob" inherited from
    devil library see devil documentation at http://rdoc.info/github/banister/devil/master/Devil/Image
    

NOTE: imageruby-devil requires imageruby-bmp or imageruby-bmp-c gems in order to to work

Installation

Gem installation

sudo gem install imageruby-devil

Usage

No explicit require is needed, examples

Example 1: PNG

require "imageruby"

include ImageRuby

# create image (red gradient and random green)
image = Image.new(255,255) {|x,y| Color.from_rgb(x,rand(200),0) }

# save image on png format
image.save("image.png", :png)

Example 2: Blur and mirror

require "imageruby"

include ImageRuby

# load image generated in the previous example
image = Image.from_file("image.png")

# apply blur effect
image = image.blur(10)

# mirror image
image = image.mirror

# save image on png format
image.save("image2.png", :png)

Copying

Copyright © 2011 Dario Seminara, released under the GPL License (see LICENSE)