MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / Colorspace

Method Colorspace

vips/vips.go:821–834  ·  view source on GitHub ↗
(colorspace Interpretation)

Source from the content-addressed store, hash-verified

819}
820
821func (img *Image) Colorspace(colorspace Interpretation) error {
822 if img.Type() == colorspace {
823 return nil
824 }
825
826 var tmp *C.VipsImage
827
828 if C.vips_colourspace_go(img.VipsImage, &tmp, C.VipsInterpretation(colorspace)) != 0 {
829 return Error()
830 }
831 img.swapAndUnref(tmp)
832
833 return nil
834}
835
836func (img *Image) CopyMemory() error {
837 var tmp *C.VipsImage

Callers 4

LinearColourspaceMethod · 0.95
RgbColourspaceMethod · 0.95
scaleMethod · 0.80

Calls 3

TypeMethod · 0.95
swapAndUnrefMethod · 0.95
ErrorFunction · 0.70

Tested by

no test coverage detected