minicomic-backend/classes/TempBitmapToWeb.rb

20 lines
526 B
Ruby
Raw Normal View History

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