File: constitute.rb

package info (click to toggle)
ruby-rmagick 2.13.1-6
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,524 kB
  • sloc: ansic: 16,755; ruby: 9,730; sh: 14; makefile: 12
file content (7 lines) | stat: -rw-r--r-- 292 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
#! /usr/local/bin/ruby -w
require 'RMagick'

f = Magick::Image.read(File.join(File.dirname(__FILE__), "../doc/ex/images/Flower_Hat.jpg")).first
pixels = f.dispatch(0,0,f.columns, f.rows, "RGB")
image = Magick::Image.constitute(f.columns, f.rows, "RGB", pixels)
image.write("constitute.miff")