2010-01-07 03:56:52 +00:00
|
|
|
require File.dirname(__FILE__) + '/OutputFilter.rb'
|
|
|
|
|
|
|
|
#
|
|
|
|
# Process an input file for the Web
|
|
|
|
#
|
|
|
|
class TempBitmapToWeb < OutputFilter
|
|
|
|
def build(input, output)
|
|
|
|
quality = @config['quality'] ? @config['quality'] : 80
|
|
|
|
convert("\"#{input}\" -quality #{quality} \"#{output}\"")
|
|
|
|
end
|
|
|
|
|
|
|
|
def filename(info)
|
|
|
|
index = info['index'].to_i
|
2010-01-10 14:54:53 +00:00
|
|
|
|
|
|
|
info['date'] = @config['publish_dates'][index].strftime(@config['date_format'])
|
2010-01-07 03:56:52 +00:00
|
|
|
super(info)
|
|
|
|
end
|
|
|
|
end
|