mirror of
https://github.com/willnorris/imageproxy.git
synced 2026-04-26 13:26:23 +02:00
parent
4b637567e3
commit
03d75816a0
2 changed files with 14 additions and 9 deletions
16
transform.go
16
transform.go
|
|
@ -207,14 +207,6 @@ func transformImage(m image.Image, opt Options) image.Image {
|
|||
}
|
||||
}
|
||||
|
||||
// flip
|
||||
if opt.FlipVertical {
|
||||
m = imaging.FlipV(m)
|
||||
}
|
||||
if opt.FlipHorizontal {
|
||||
m = imaging.FlipH(m)
|
||||
}
|
||||
|
||||
// rotate
|
||||
switch opt.Rotate {
|
||||
case 90:
|
||||
|
|
@ -225,5 +217,13 @@ func transformImage(m image.Image, opt Options) image.Image {
|
|||
m = imaging.Rotate270(m)
|
||||
}
|
||||
|
||||
// flip
|
||||
if opt.FlipVertical {
|
||||
m = imaging.FlipV(m)
|
||||
}
|
||||
if opt.FlipHorizontal {
|
||||
m = imaging.FlipH(m)
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue