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

Method RemoveAnimation

vips/vips.go:440–449  ·  view source on GitHub ↗

RemoveAnimation removes all animation-related data from the image making it a static image. It doesn't remove already loaded frames and keeps them vertically stacked.

()

Source from the content-addressed store, hash-verified

438//
439// It doesn't remove already loaded frames and keeps them vertically stacked.
440func (img *Image) RemoveAnimation() error {
441 var tmp *C.VipsImage
442
443 if C.vips_image_remove_animation(img.VipsImage, &tmp) != 0 {
444 return Error()
445 }
446
447 img.swapAndUnref(tmp)
448 return nil
449}
450
451func (img *Image) HasAlpha() bool {
452 return C.vips_image_hasalpha(img.VipsImage) > 0

Callers 1

Calls 2

swapAndUnrefMethod · 0.95
ErrorFunction · 0.70

Tested by

no test coverage detected