14 lines
268 B
Ruby
14 lines
268 B
Ruby
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
|