MCPcopy Create free account
hub / github.com/google/gapid / Convert

Method Convert

core/image/image.go:98–104  ·  view source on GitHub ↗

Convert returns the Data converted to the format to.

(to *Format)

Source from the content-addressed store, hash-verified

96
97// Convert returns the Data converted to the format to.
98func (b *Data) Convert(to *Format) (*Data, error) {
99 bytes, err := Convert(b.Bytes, int(b.Width), int(b.Height), int(b.Depth), b.Format, to)
100 if err != nil {
101 return nil, err
102 }
103 return &Data{Bytes: bytes, Width: b.Width, Height: b.Height, Depth: b.Depth, Format: to}, nil
104}
105
106// NewInfo stores the image.Data's content to the database then uses the ID to
107// create a new image.Info which describes this image.Data.

Callers 2

TestDecompressorsFunction · 0.95
postFBDataFunction · 0.95

Calls 1

ConvertFunction · 0.70

Tested by 1

TestDecompressorsFunction · 0.76