Sha256: 661896782de9a2e877543da80184b6e3a8b90957a10b0a79bc7d6aa665ad231a

Contents?: true

Size: 365 Bytes

Versions: 18

Compression:

Stored size: 365 Bytes

Contents

require 'image_science'

# reads in the file specified by ARGV[0], transforms it into a 32-pixel thumbnail,
# and writes it out to the file specified by ARGV[1], using that extension as the
# target format.
ImageScience.with_image(ARGV[0]) do |img|
  img.thumbnail(32) do |img2|
    if ARGV[1]
      img2.save(ARGV[1])
    else
      img2.preview
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
image_voodoo-0.9.0 samples/file_thumbnail.rb
image_voodoo-0.8.9 samples/file_thumbnail.rb
image_voodoo-0.8.8 samples/file_thumbnail.rb
image_voodoo-0.8.7 samples/file_thumbnail.rb
image_voodoo-0.8.6 samples/file_thumbnail.rb
image_voodoo-0.8.5 samples/file_thumbnail.rb
image_voodoo-0.8.4 samples/file_thumbnail.rb
image_voodoo-0.8.3 samples/file_thumbnail.rb
image_voodoo-0.8.2 samples/file_thumbnail.rb
image_voodoo-0.8.1 samples/file_thumbnail.rb
image_voodoo-0.8.0 samples/file_thumbnail.rb
image_voodoo-0.7 samples/file_thumbnail.rb
image_voodoo-0.6 samples/file_thumbnail.rb
image_voodoo-0.2 samples/file_thumbnail.rb
image_voodoo-0.5 samples/file_thumbnail.rb
image_voodoo-0.4 samples/file_thumbnail.rb
image_voodoo-0.3 samples/file_thumbnail.rb
image_voodoo-0.1 samples/file_thumbnail.rb