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

Method Embed

vips/vips.go:856–865  ·  view source on GitHub ↗
(width, height int, offX, offY int)

Source from the content-addressed store, hash-verified

854}
855
856func (img *Image) Embed(width, height int, offX, offY int) error {
857 var tmp *C.VipsImage
858
859 if C.vips_embed_go(img.VipsImage, &tmp, C.int(offX), C.int(offY), C.int(width), C.int(height)) != 0 {
860 return Error()
861 }
862 img.swapAndUnref(tmp)
863
864 return nil
865}
866
867func (img *Image) ApplyWatermark(wm *Image, left, top int, opacity float64) error {
868 var tmp *C.VipsImage

Callers 2

extendImageFunction · 0.80
paddingMethod · 0.80

Calls 2

swapAndUnrefMethod · 0.95
ErrorFunction · 0.70

Tested by

no test coverage detected