instantiateCodec abstract method

Future<Codec> instantiateCodec({
  1. int? targetWidth,
  2. int? targetHeight,
})

Creates a Codec object which is suitable for decoding the data in the buffer to an Image.

If only one of targetWidth or targetHeight are specified, the other dimension will be scaled according to the aspect ratio of the supplied dimension.

If either targetWidth or targetHeight is less than or equal to zero, it will be treated as if it is null.

Implementation

Future<Codec> instantiateCodec({int? targetWidth, int? targetHeight});