NewFromBytesWithFormat creates a new ImageData instance from the provided format and byte slice.
(format imagetype.Type, b []byte)
| 42 | // NewFromBytesWithFormat creates a new ImageData instance from the provided format |
| 43 | // and byte slice. |
| 44 | func NewFromBytesWithFormat(format imagetype.Type, b []byte) ImageData { |
| 45 | return &imageDataBytes{ |
| 46 | data: b, |
| 47 | format: format, |
| 48 | cancel: nil, |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | // NewFromBytes creates a new ImageData instance from the provided byte slice. |
| 53 | func (f *Factory) NewFromBytes(b []byte) (ImageData, error) { |
no outgoing calls