Sha256: 9a8f24ed2df7b4ef46a05503bc39875fdecf25097e2100ea93d922423ae790a5
Contents?: true
Size: 380 Bytes
Versions: 3
Compression:
Stored size: 380 Bytes
Contents
# frozen_string_literal: true require 'image_voodoo' # reads in the image at ARGV[0], transforms it into a 32-pixel thumbnail in-memory, # and writes it back out as a png to the file specified by ARGV[1] ImageVoodoo.with_bytes(File.read(ARGV[0])) do |img| img.thumbnail(32) do |img2| File.open(ARGV[1], 'w') do |file| file.write(img2.bytes('png')) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
image_voodoo-0.9.3 | samples/in_memory.rb |
image_voodoo-0.9.2 | samples/in_memory.rb |
image_voodoo-0.9.1 | samples/in_memory.rb |