RMagick Portfolio - Special Effects
Original image

Here's some more examples of what RMagick can do. Check out these special effects! The next page demonstrates the drawing API. Or, you can go back to the transformations.

segment Polaroid Effect
require 'RMagick'

clown = Magick::Image.read("clown.jpg").first
cols, rows = clown.columns, clown.rows

clown[:caption] = "Hi!"
clown = clown.polaroid { self.gravity = Magick::CenterGravity }

clown.change_geometry!("#{cols}x#{rows}") do |ncols, nrows, img|
    img.resize!(ncols, nrows)
    end

clown.write('polaroid.png')
Adaptive Threshold Vignette
require 'RMagick'

clown = Magick::Image.read("clown.jpg")
clown = clown[0].vignette
clown.write('new-vignette.jpg')
edge Edge
require 'RMagick'

clown = Magick::ImageList.new("clown.jpg")
clown = clown.edge(8)
clown.write('edge.jpg')
emboss Emboss
require 'RMagick'

clown = Magick::ImageList.new("clown.jpg")
clown = clown.emboss
clown.write('emboss.jpg')
implode Implode
require 'RMagick'

clown = Magick::ImageList.new("clown.jpg")
clown = clown.implode(0.4)
clown.write('implode.jpg')
negate Negate
require 'RMagick'

clown = Magick::ImageList.new("clown.jpg")
clown = clown.negate
clown.write('negate.jpg')
oil_paint Oil paint
require 'RMagick'

clown = Magick::ImageList.new("clown.jpg")
clown = clown.oil_paint
clown.write('oil_paint.jpg')
spread Spread
require 'RMagick'

clown = Magick::ImageList.new("clown.jpg")
clown = clown.spread
clown.write('spread.jpg')
wave Wave
require 'RMagick'

clown = Magick::ImageList.new("clown.jpg")
clown = clown.wave(10, 200)
clown.write('wave.jpg')
<- Transformations | RMagick Home Page | Drawing ->