MCPcopy Index your code
hub / github.com/gopherdata/gophernotes / imageMetadata

Function imageMetadata

image.go:37–43  ·  view source on GitHub ↗

imageMetadata returns image size, represented as MIMEMap{"width": width, "height": height}

(img image.Image)

Source from the content-addressed store, hash-verified

35
36// imageMetadata returns image size, represented as MIMEMap{"width": width, "height": height}
37func imageMetadata(img image.Image) MIMEMap {
38 rect := img.Bounds()
39 return MIMEMap{
40 "width": rect.Dx(),
41 "height": rect.Dy(),
42 }
43}

Callers 2

display.goFile · 0.85
ImageFunction · 0.85

Calls 1

BoundsMethod · 0.80

Tested by

no test coverage detected