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

Method CastUchar

vips/vips.go:552–563  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

550}
551
552func (img *Image) CastUchar() error {
553 var tmp *C.VipsImage
554
555 if C.vips_image_get_format(img.VipsImage) != C.VIPS_FORMAT_UCHAR {
556 if C.vips_cast_go(img.VipsImage, &tmp, C.VIPS_FORMAT_UCHAR) != 0 {
557 return Error()
558 }
559 img.swapAndUnref(tmp)
560 }
561
562 return nil
563}
564
565func (img *Image) Rad2Float() error {
566 var tmp *C.VipsImage

Callers

nothing calls this directly

Calls 2

swapAndUnrefMethod · 0.95
ErrorFunction · 0.70

Tested by

no test coverage detected