File: splice.rb

package info (click to toggle)
ruby-rmagick 6.0.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,232 kB
  • sloc: cpp: 19,563; ruby: 17,147; sh: 88; javascript: 36; makefile: 13
file content (7 lines) | stat: -rw-r--r-- 215 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
require 'rmagick'

# Demonstrate the splice method.

img = Magick::Image.read('images/Flower_Hat.jpg').first
spliced_img = img.splice(img.columns / 2, img.rows / 2, 20, 20, 'gray80')
spliced_img.write('splice.jpg')