Drop vips_ensure_alpha; Refactor vips_apply_watermark

This commit is contained in:
DarthSim
2022-09-30 17:45:12 +06:00
parent 3902155170
commit dda20f1a1d
3 changed files with 20 additions and 36 deletions

View File

@@ -553,17 +553,6 @@ func (img *Image) Trim(threshold float64, smart bool, color Color, equalHor bool
return nil
}
func (img *Image) EnsureAlpha() error {
var tmp *C.VipsImage
if C.vips_ensure_alpha(img.VipsImage, &tmp) != 0 {
return Error()
}
C.swap_and_clear(&img.VipsImage, tmp)
return nil
}
func (img *Image) Flatten(bg Color) error {
var tmp *C.VipsImage