Sha256: e4590d8e4f29c4191d34c5b9618b24c319b031b4b526361d217ddd9bd3d04085

Contents?: true

Size: 297 Bytes

Versions: 19

Compression:

Stored size: 297 Bytes

Contents

#!/usr/bin/env ruby -w
require 'rmagick'

# Demonstrate the Image#shave method

img = Magick::Image.read('images/Flower_Hat.jpg').first

img = img.shave(20, 25)

# Add a border so the shaved image is the
# same size as the original image.
img.border!(20, 25, 'white')

img.write('shave.jpg')
exit

Version data entries

19 entries across 19 versions & 3 rubygems

Version Path
rmagick-4.1.0.rc2 doc/ex/shave.rb
rmagick-4.1.0.rc1 doc/ex/shave.rb
rmagick-4.0.0 doc/ex/shave.rb
rmagick-3.2.0 doc/ex/shave.rb
rmagick-3.1.0 doc/ex/shave.rb
rmagick-3.0.0 doc/ex/shave.rb
rmagick-windows-2.16.5 doc/ex/shave.rb
rmagick-windows-2.16.4 doc/ex/shave.rb
rmagick-windows-2.16.3 doc/ex/shave.rb
rmagick-windows-2.16.2 doc/ex/shave.rb
rmagick-windows-2.16.1 doc/ex/shave.rb
mdg-1.0.1 vendor/bundle/ruby/2.3.0/gems/rmagick-2.16.0/doc/ex/shave.rb
rmagick-2.16.0 doc/ex/shave.rb
rmagick-2.15.4 doc/ex/shave.rb
rmagick-2.15.3 doc/ex/shave.rb
rmagick-2.15.2 doc/ex/shave.rb
rmagick-2.15.1 doc/ex/shave.rb
rmagick-2.15.0 doc/ex/shave.rb
rmagick-2.14.0 doc/ex/shave.rb