Sha256: ab6f068f4adb51f93a32f4ffad55baaec68d55af3ec6bb61cbde8b024d983ff4

Contents?: true

Size: 545 Bytes

Versions: 1

Compression:

Stored size: 545 Bytes

Contents

#! /usr/bin/ruby

#IMAGEMAGICK_PATH = '/usr/local/bin/convert'
IMAGEMAGICK_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 = IMAGEMAGICK_PATH + ' ' + oldFileName + ' -resize ' + TARGET_SIZE +
    ' ' + newFileName
  print commandLine + "\n"
  system(commandLine)
end

print "\a"

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
imagut-0.0.4 bin/resizeimage