Sha256: 35a0b6d3c4326f5dde8b65a0e13e51724efd8d735eb2199503518c18ea10a7e4

Contents?: true

Size: 379 Bytes

Versions: 13

Compression:

Stored size: 379 Bytes

Contents

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

before = Magick::Image.read('images/Flower_Hat.jpg').first
before.resize!(0.50)  # make it small so this example will run fast

blob = before.to_blob
# We could pass the format, depth, and geometry as optional
# arguments to `from_blob' but that is not required.
after = Magick::Image.from_blob(blob)

after[0].write('to_blob.gif')
exit

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
rmagick-windows-2.16.5 doc/ex/to_blob.rb
rmagick-windows-2.16.4 doc/ex/to_blob.rb
rmagick-windows-2.16.3 doc/ex/to_blob.rb
rmagick-windows-2.16.2 doc/ex/to_blob.rb
rmagick-windows-2.16.1 doc/ex/to_blob.rb
mdg-1.0.1 vendor/bundle/ruby/2.3.0/gems/rmagick-2.16.0/doc/ex/to_blob.rb
rmagick-2.16.0 doc/ex/to_blob.rb
rmagick-2.15.4 doc/ex/to_blob.rb
rmagick-2.15.3 doc/ex/to_blob.rb
rmagick-2.15.2 doc/ex/to_blob.rb
rmagick-2.15.1 doc/ex/to_blob.rb
rmagick-2.15.0 doc/ex/to_blob.rb
rmagick-2.14.0 doc/ex/to_blob.rb