ADD: quality-process added to FotoUploader

This commit is contained in:
HausdorffHimself
2013-09-12 03:07:52 +02:00
parent 17d2241100
commit a2e1b9d55b
2 changed files with 16 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
module CarrierWave
module RMagick
def quality(percentage)
manipulate! do |img|
img.write(current_path){ self.quality = percentage } unless img.quality == percentage
img = yield(img) if block_given?
img
end
end
end
end