mirror of
https://github.com/willnorris/imageproxy.git
synced 2026-04-30 23:36:24 +02:00
parse crop and resize params before transforms
This commit is contained in:
parent
8eee5513ab
commit
ba2da75102
2 changed files with 16 additions and 3 deletions
|
|
@ -351,6 +351,13 @@ func TestTransformImage(t *testing.T) {
|
|||
Options{CropHeight: 2, CropWidth: 2, CropX: 2, CropY: 2},
|
||||
newImage(2, 2, yellow, yellow, yellow, yellow),
|
||||
},
|
||||
|
||||
// percentage-based resize in addition to rectangular crop
|
||||
{
|
||||
newImage(12, 12, red),
|
||||
Options{Width: 0.5, Height: 0.5, CropWidth: 8, CropHeight: 8},
|
||||
newImage(6, 6, red),
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue