MCPcopy Create free account
hub / github.com/cogentcore/core / LayerByteSize

Method LayerByteSize

vgpu/image.go:299–301  ·  view source on GitHub ↗

LayerByteSize returns number of bytes required to represent one layer of image in Host memory. TODO only works for known formats -- need to add more as needed.

()

Source from the content-addressed store, hash-verified

297// image in Host memory. TODO only works
298// for known formats -- need to add more as needed.
299func (im *ImageFormat) LayerByteSize() int {
300 return im.BytesPerPixel() * im.Size.X * im.Size.Y
301}
302
303// TotalByteSize returns total number of bytes required to represent all layers of
304// images in Host memory. TODO only works

Callers 3

TotalByteSizeMethod · 0.95
HostPixelsMethod · 0.80
DevGoImageCopyMethod · 0.80

Calls 1

BytesPerPixelMethod · 0.95

Tested by

no test coverage detected