mirror of
https://github.com/willnorris/imageproxy.git
synced 2026-04-25 21:06:24 +02:00
add options to flip horizontally and vertically
This commit is contained in:
parent
d506fc6881
commit
a039c1bbca
4 changed files with 36 additions and 10 deletions
|
|
@ -73,6 +73,14 @@ func Transform(img data.Image, opt *data.Options) (*data.Image, error) {
|
|||
}
|
||||
}
|
||||
|
||||
// flip
|
||||
if opt.FlipVertical {
|
||||
m = imaging.FlipV(m)
|
||||
}
|
||||
if opt.FlipHorizontal {
|
||||
m = imaging.FlipH(m)
|
||||
}
|
||||
|
||||
// rotate
|
||||
switch opt.Rotate {
|
||||
case 90:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue