gs -r300 -dBATCH -dNOPAUSE -sDEVICE=jpeg -sOutputFile=moo.jpg moo.psI created a nice ruby script to gather the relavant options and run GS for me:
# Need to create commands like this:
#
# gs -r300 -dBATCH -dNOPAUSE -sDEVICE=jpeg
# -sOutputFile=arp-activity-per-20-minute-interval.jpg
# arp-activity-per-20-minute-interval.ps
if ARGV.length < 3
puts "Usage: ruby imageconvert.rb <input> <output> <output format> <dpi>"
exit
end
# Get the command line arguements we need
input = ARGV[0]
output = ARGV[1]
format = ARGV[2]
dpi = ARGV[3]
if (!dpi)
dpi = 100
end
puts "Input file: #{input}"
puts "Output file: #{output}"
puts "Output format: #{format}"
puts "Running: gs -r#{dpi} -dBATCH -dNOPAUSE -sDEVICE=#{format} -sOutputFile=#{output} #{input}"
system "gs -r#{dpi} -dBATCH -dNOPAUSE -sDEVICE=#{format} -sOutputFile=#{output} #{input}"
No comments:
Post a Comment