mirror of
https://github.com/willnorris/imageproxy.git
synced 2025-01-06 22:40:34 -05:00
remove unnecessary break statements
This commit is contained in:
parent
7d5c68c4a0
commit
1bf3ccab06
1 changed files with 0 additions and 6 deletions
|
@ -86,13 +86,10 @@ func Transform(img []byte, opt *Options) ([]byte, error) {
|
||||||
switch opt.Rotate {
|
switch opt.Rotate {
|
||||||
case 90:
|
case 90:
|
||||||
m = imaging.Rotate90(m)
|
m = imaging.Rotate90(m)
|
||||||
break
|
|
||||||
case 180:
|
case 180:
|
||||||
m = imaging.Rotate180(m)
|
m = imaging.Rotate180(m)
|
||||||
break
|
|
||||||
case 270:
|
case 270:
|
||||||
m = imaging.Rotate270(m)
|
m = imaging.Rotate270(m)
|
||||||
break
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// encode image
|
// encode image
|
||||||
|
@ -100,13 +97,10 @@ func Transform(img []byte, opt *Options) ([]byte, error) {
|
||||||
switch format {
|
switch format {
|
||||||
case "gif":
|
case "gif":
|
||||||
gif.Encode(buf, m, nil)
|
gif.Encode(buf, m, nil)
|
||||||
break
|
|
||||||
case "jpeg":
|
case "jpeg":
|
||||||
jpeg.Encode(buf, m, &jpeg.Options{95})
|
jpeg.Encode(buf, m, &jpeg.Options{95})
|
||||||
break
|
|
||||||
case "png":
|
case "png":
|
||||||
png.Encode(buf, m)
|
png.Encode(buf, m)
|
||||||
break
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return buf.Bytes(), nil
|
return buf.Bytes(), nil
|
||||||
|
|
Loading…
Reference in a new issue