Kill trailing whitespace in ruby files

This commit is contained in:
小太
2013-03-19 23:10:10 +11:00
parent c107f96cec
commit cba839ba76
319 changed files with 2710 additions and 2710 deletions

View File

@@ -7,28 +7,28 @@ module Danbooru
# wider than it is tall
geometry = "#{Danbooru.config.small_image_width}x#{Danbooru.config.small_image_width}>"
end
image.change_geometry(geometry) do |new_width, new_height, img|
img.resize!(new_width, new_height)
width = new_width
height = new_height
end
image = flatten(image, width, height)
image.write(write_path) do
self.quality = resize_quality
end
image.destroy!
FileUtils.chmod(0664, write_path)
end
def flatten(image, width, height)
if image.alpha?
# since jpeg can't represent transparency, we need to create an image list,
# put a white image on the bottom, then flatten it.
list = Magick::ImageList.new
list.new_image(width, height) do
self.background_color = "#FFFFFF"