Sha256: 38b2c643bed0b61603b2d95bcf4e62293878bb5271e3e313af4f87a5050ff4f9
Contents?: true
Size: 542 Bytes
Versions: 4
Compression:
Stored size: 542 Bytes
Contents
#! /usr/bin/ruby #IMAGEMAGIC_PATH = '/usr/local/bin/convert' IMAGEMAGIC_PATH = '/usr/bin/convert' TARGET_SIZE = '"1200x960>"' # '>' means to shrink but not to expand. oldFileNameAry = ARGV oldFileNameAry.each do |oldFileName| #extention = File.extname(oldFileName) #p newFileName = oldFileName.sub(/#{extention}$/, "-s#{extention}") newFileName = oldFileName commandLine = IMAGEMAGIC_PATH + ' ' + oldFileName + ' -resize ' + TARGET_SIZE + ' ' + newFileName print commandLine + "\n" system(commandLine) end print "\a"
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
imagut-0.0.3 | bin/resizeimage |
imagut-0.0.2 | bin/resizeimage |
imagut-0.0.1 | bin/resizeimage |
imagut-0.0.0 | bin/resizeimage |