Skip to content

Commit 0da4b82

Browse files
committed
Add fill, focus_x, and focus_y arguments to the video_thumbnail_tile processing option
1 parent 1550076 commit 0da4b82

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
### Added
88
- Add `smart_subsample` argument to the `webp_options` processing option.
99
- Add `watermark_rotate` processing option support.
10+
- Add `fill`, `focus_x`, and `focus_y` arguments to the `video_thumbnail_tile` processing option.
1011

1112
### Fixed
1213

lib/imgproxy/options_casters/video_thumbnail_tile.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ module VideoThumbnailTile
1717
tile_height: Imgproxy::OptionsCasters::Integer,
1818
extend_tile: Imgproxy::OptionsCasters::Bool,
1919
trim: Imgproxy::OptionsCasters::Bool,
20+
fill: Imgproxy::OptionsCasters::Bool,
21+
focus_x: Imgproxy::OptionsCasters::Float,
22+
focus_y: Imgproxy::OptionsCasters::Float,
2023
).freeze
2124

2225
def self.cast(raw)

spec/url_for_spec.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,9 @@
195195
tile_height: 100,
196196
extend_tile: true,
197197
trim: true,
198+
fill: true,
199+
focus_x: 0.25,
200+
focus_y: 0.75,
198201
},
199202
fallback_image_url: "https://images.test/fallback.jpg",
200203
skip_processing: %w[gif svg],
@@ -277,7 +280,7 @@
277280
"da:1",
278281
"vts:15",
279282
"vtk:1",
280-
"vtt:1.5:2:3:200:100:1:1",
283+
"vtt:1.5:2:3:200:100:1:1:1:0.25:0.75",
281284
"fiu:aHR0cHM6Ly9pbWFnZXMudGVzdC9mYWxsYmFjay5qcGc",
282285
"skp:gif:svg",
283286
"raw:1",
@@ -352,7 +355,7 @@
352355
"disable_animation:1",
353356
"video_thumbnail_second:15",
354357
"video_thumbnail_keyframes:1",
355-
"video_thumbnail_tile:1.5:2:3:200:100:1:1",
358+
"video_thumbnail_tile:1.5:2:3:200:100:1:1:1:0.25:0.75",
356359
"fallback_image_url:aHR0cHM6Ly9pbWFnZXMudGVzdC9mYWxsYmFjay5qcGc",
357360
"skip_processing:gif:svg",
358361
"raw:1",

0 commit comments

Comments
 (0)