minicomic-backend/classes/TempBitmapToWeb.rb
2010-01-10 17:12:23 -05:00

20 lines
526 B
Ruby

require File.dirname(__FILE__) + '/OutputFilter.rb'
require File.dirname(__FILE__) + '/../modules/ImageProcessing.rb'
#
# Process an input file for the Web
#
class TempBitmapToWeb < OutputFilter
include ImageProcessing
def build(input, output)
quality = @config['quality'] ? @config['quality'] : 80
convert("\"#{input}\" -quality #{quality} \"#{output}\"")
end
def filename(info)
info['date'] = @config['publish_dates'][info['index'].to_i - 1].strftime(@config['date_format'])
super(info)
end
end