getBytes method

Uint8List getBytes({
  1. ChannelOrder? order,
})

Similar to toUint8List, but will convert the channels of the image pixels to the given order. If that happens, the returned bytes will be a copy and not a direct view of the image data.

Implementation

Uint8List getBytes({ChannelOrder? order}) =>
    data?.getBytes(order: order) ?? toUint8List();