Skip to content

Commit

Permalink
Add watermark_rotate processing option support
Browse files Browse the repository at this point in the history
  • Loading branch information
DarthSim committed Apr 26, 2024
1 parent 21c3727 commit 1550076
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
## [Unreleased]
### Added
- Add `smart_subsample` argument to the `webp_options` processing option.
- Add `watermark_rotate` processing option support.

### Fixed

Expand Down
1 change: 1 addition & 0 deletions lib/imgproxy/option_aliases/processing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ module OptionAliases
watermark_url: :wmu,
watermark_text: :wmt,
watermark_size: :wms,
watermark_rotate: :wmr,
watermark_shadow: :wmsh,
style: :st,
strip_metadata: :sm,
Expand Down
1 change: 1 addition & 0 deletions lib/imgproxy/options_builders/processing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class Processing < Base
watermark_url: Imgproxy::OptionsCasters::Base64,
watermark_text: Imgproxy::OptionsCasters::Base64,
watermark_size: Imgproxy::OptionsCasters::WatermarkSize,
watermark_rotate: Imgproxy::OptionsCasters::Float,
watermark_shadow: Imgproxy::OptionsCasters::Float,
style: Imgproxy::OptionsCasters::Base64,
strip_metadata: Imgproxy::OptionsCasters::Bool,
Expand Down
3 changes: 3 additions & 0 deletions spec/url_for_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
width: 256,
height: 1024,
},
watermark_rotate: 45,
watermark_shadow: 15,
style: "color: rgba(255, 255, 255, .5)",
strip_metadata: true,
Expand Down Expand Up @@ -256,6 +257,7 @@
"wmu:aHR0cHM6Ly9pbWFnZXMudGVzdC93bS5zdmc",
"wmt:dGhlIHdhdGVybWFyaw",
"wms:256:1024",
"wmr:45",
"wmsh:15",
"st:Y29sb3I6IHJnYmEoMjU1LCAyNTUsIDI1NSwgLjUp",
"sm:1",
Expand Down Expand Up @@ -330,6 +332,7 @@
"watermark_url:aHR0cHM6Ly9pbWFnZXMudGVzdC93bS5zdmc",
"watermark_text:dGhlIHdhdGVybWFyaw",
"watermark_size:256:1024",
"watermark_rotate:45",
"watermark_shadow:15",
"style:Y29sb3I6IHJnYmEoMjU1LCAyNTUsIDI1NSwgLjUp",
"strip_metadata:1",
Expand Down

0 comments on commit 1550076

Please sign in to comment.