mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-13 09:20:29 -07:00
refactor: remove colorspace feature
This commit is contained in:
parent
8abe7b850c
commit
210c7b4bdc
5 changed files with 1 additions and 68 deletions
28
vips.go
28
vips.go
|
|
@ -156,34 +156,6 @@ func vipsZoom(image *C.struct__VipsImage, zoom int) (*C.struct__VipsImage, error
|
|||
return out, nil
|
||||
}
|
||||
|
||||
func vipsColorSpace(image *C.struct__VipsImage) (*C.struct__VipsImage, error) {
|
||||
var out *C.struct__VipsImage
|
||||
var temp *C.struct__VipsImage
|
||||
var max *C.double
|
||||
var x *C.int
|
||||
var y *C.int
|
||||
|
||||
defer C.g_object_unref(C.gpointer(image))
|
||||
|
||||
err := C.vips_colorspace_bridge(image, &out)
|
||||
if err != 0 {
|
||||
return nil, catchVipsError()
|
||||
}
|
||||
|
||||
err = C.vips_hist_find_ndim_bridge(out, &temp)
|
||||
if err != 0 {
|
||||
return nil, catchVipsError()
|
||||
}
|
||||
|
||||
err = C.vips_max_bridge(temp, max, &x, &y)
|
||||
if err != 0 {
|
||||
return nil, catchVipsError()
|
||||
}
|
||||
debug("MAX VALUE %dx%d", x, y)
|
||||
|
||||
return temp, nil
|
||||
}
|
||||
|
||||
func vipsWatermark(image *C.struct__VipsImage, w Watermark) (*C.struct__VipsImage, error) {
|
||||
var out *C.struct__VipsImage
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue