Skip to content

Commit

Permalink
fix: pass enlarge:true to resize_to_fit/fill
Browse files Browse the repository at this point in the history
  • Loading branch information
palkan committed Oct 25, 2023
1 parent bfa1e18 commit 75eae76
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/imgproxy-rails/transformer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ class Transformer
{width: width, height: height}
end,
resize_to_limit: proc { |p| {width: p[0], height: p[1]} },
resize_to_fit: proc { |p| {width: p[0], height: p[1]} },
resize_to_fill: proc { |p| {width: p[0], height: p[1], resizing_type: :fill} },
resize_to_fit: proc { |p| {width: p[0], height: p[1], enlarge: true} },
resize_to_fill: proc { |p| {width: p[0], height: p[1], resizing_type: :fill, enlarge: true} },
resize_and_pad: proc { |p, m| resize_and_pad(p, m) },
convert: proc { |p| {format: p} },
trim: proc { {trim: 0} },
Expand Down
1 change: 1 addition & 0 deletions spec/lib/imgproxy-rails/transformer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
{
width: 500,
height: 500,
enlarge: true,
resizing_type: :fit,
rotate: 90,
format: :jpg,
Expand Down

0 comments on commit 75eae76

Please sign in to comment.