Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Replaces doc/ex/Adispatch.rb and Zconstitute.rb

  • Loading branch information...
commit 1f35f69d7bb683ae9b785f6341f865f4ed827578 1 parent c54bbff
rmagick authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 examples/constitute.rb
7 examples/constitute.rb
View
@@ -0,0 +1,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")
Please sign in to comment.
Something went wrong with that request. Please try again.