You've already forked imgproxy
mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-11-27 22:48:53 +02:00
Merge branch 'version/3' into version/3-refactoring
This commit is contained in:
12
vips/vips.go
12
vips/vips.go
@@ -436,6 +436,18 @@ func (img *Image) Resize(wscale, hscale float64) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (img *Image) Pixelate(pixels int) error {
|
||||
var tmp *C.VipsImage
|
||||
|
||||
if C.vips_pixelate(img.VipsImage, &tmp, C.int(pixels)) != 0 {
|
||||
return Error()
|
||||
}
|
||||
|
||||
C.swap_and_clear(&img.VipsImage, tmp)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (img *Image) Orientation() C.int {
|
||||
return C.vips_get_orientation(img.VipsImage)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user