Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

16 lines (11 sloc) 0.334 kb
#! /usr/local/bin/ruby -w
require 'RMagick'
include Magick
img = Image.read('../doc/ex/images/Gold_Statue.jpg').first
copy = Image.new(img.columns, img.rows);
img.rows.times { |r|
scanline = img.export_pixels(0, r, img.columns, 1, "RGB");
copy.import_pixels(0, r, img.columns, 1, "RGB", scanline);
}
copy.display
exit
Jump to Line
Something went wrong with that request. Please try again.