You've already forked image_processing
mirror of
https://github.com/usetrmnl/image_processing.git
synced 2026-04-29 13:33:11 -07:00
[vips] Simplify setting :Q
This commit is contained in:
@@ -54,7 +54,7 @@ module ImageProcessing
|
||||
# pipeline defined in the Vips::Image object. Accepts additional
|
||||
# saver-specific options (e.g. quality).
|
||||
def self.save_image(image, path, saver: nil, quality: nil, **options)
|
||||
options = options.merge(Q: quality) if quality
|
||||
options[:Q] = quality if quality
|
||||
|
||||
if saver
|
||||
image.public_send(:"#{saver}save", path, **options)
|
||||
|
||||
Reference in New Issue
Block a user