File: constitute.rb

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

f = Magick::Image.read("../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")