mirror of
https://github.com/gen2brain/cbconvert
synced 2025-10-14 10:38:51 +02:00
Remove flip
This commit is contained in:
13
cbconvert.go
13
cbconvert.go
@@ -120,8 +120,6 @@ type Options struct {
|
||||
Grayscale bool
|
||||
// Rotate images, valid values are 0, 90, 180, 270
|
||||
Rotate int
|
||||
// Flip images, valid values are none, horizontal, vertical
|
||||
Flip string
|
||||
// Adjust the brightness of the images, must be in the range (-100, 100)
|
||||
Brightness int
|
||||
// Adjust the contrast of the images, must be in the range (-100, 100)
|
||||
@@ -496,7 +494,7 @@ func (c *Convertor) imageConvert(ctx context.Context, img image.Image, index int
|
||||
return nil
|
||||
}
|
||||
|
||||
// imageTransform transforms image (resize, rotate, flip, brightness, contrast).
|
||||
// imageTransform transforms image (resize, rotate, brightness, contrast).
|
||||
func (c *Convertor) imageTransform(img image.Image) image.Image {
|
||||
var i = img
|
||||
|
||||
@@ -519,15 +517,6 @@ func (c *Convertor) imageTransform(img image.Image) image.Image {
|
||||
}
|
||||
}
|
||||
|
||||
if c.Opts.Flip != "none" {
|
||||
switch c.Opts.Flip {
|
||||
case "horizontal":
|
||||
i = imaging.FlipH(i)
|
||||
case "vertical":
|
||||
i = imaging.FlipV(i)
|
||||
}
|
||||
}
|
||||
|
||||
if c.Opts.Brightness != 0 {
|
||||
i = imaging.AdjustBrightness(i, float64(c.Opts.Brightness))
|
||||
}
|
||||
|
Reference in New Issue
Block a user