Sha256: df0742106b8af1fbb0be6b053b7ef9d46eadbda1a2364339a533b6ba1c6e52e7
Contents?: true
Size: 349 Bytes
Versions: 18
Compression:
Stored size: 349 Bytes
Contents
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
18 entries across 18 versions & 1 rubygems