Skip to content

Commit b51224e

Browse files
committed
Add unsharpening processing option but mark it as deprecated
1 parent f18118c commit b51224e

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

lib/imgproxy/options_builders/processing.rb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,19 @@ class Processing < Base
110110

111111
META = %i[size resize adjust].freeze
112112

113+
def initialize(options)
114+
super
115+
116+
# Legacy name for unsharp_masking
117+
if options.key?(:unsharpening)
118+
warn "[DEPRECATION] `unsharpening` option is deprecated. Please use `unsharp_masking` instead."
119+
delete(:unsharpening)
120+
unless self.key?(:unsharp_masking)
121+
self[:unsharp_masking] = CASTERS[:unsharp_masking].cast(options[:unsharpening])
122+
end
123+
end
124+
end
125+
113126
private
114127

115128
def group_opts

0 commit comments

Comments
 (0)