MCPcopy Create free account
hub / github.com/HugoSmits86/nativewebp / DecodeConfig

Function DecodeConfig

reader.go:50–52  ·  view source on GitHub ↗

DecodeConfig reads the image configuration from the provided io.Reader without fully decoding the image. This function is a wrapper around the underlying WebP decode package (golang.org/x/image/webp) and provides access to the image's metadata, such as its dimensions and color model. It is useful f

(r io.Reader)

Source from the content-addressed store, hash-verified

48// Returns:
49// An image.Config containing the image's dimensions and color model, or an error if the configuration cannot be retrieved
50func DecodeConfig(r io.Reader) (image.Config, error) {
51 return decoderWebP.DecodeConfig(r)
52}
53
54// DecodeIgnoreAlphaFlag reads a WebP image from the provided io.Reader and returns it as an image.Image.
55//

Callers 1

TestDecodeConfigFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestDecodeConfigFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…