Fix ugoira thumbs not being scaled down to 150x150

This commit is contained in:
Toks
2014-10-19 02:30:03 -07:00
committed by r888888888
parent 029f0eff06
commit 230a5ad37e
+6 -4
View File
@@ -45,9 +45,11 @@ class PixivUgoiraConverter
end end
def write_preview(folder, path) def write_preview(folder, path)
file = folder.first Dir.mktmpdir do |tmpdir|
image_blob = file.get_input_stream {|is| is.read} file = folder.first
image = Magick::Image.from_blob(image_blob).first temp_path = File.join(tmpdir, file.name)
image.write(path) file.extract(temp_path)
Danbooru.resize(temp_path, path, Danbooru.config.small_image_width, Danbooru.config.small_image_width, 85)
end
end end
end end