getImageBytes method

  1. @Deprecated("See [DeviceImage] for a better way to load the image contents.")
Future<Uint8List> getImageBytes(
  1. LocalImageProvider localImageProvider,
  2. int desiredHeight,
  3. int desiredWidth
)

Returns a jpeg of the image that can be loaded into a MemoryImage.

The resulting image will maintain its aspect ratio and fit within a pixelHeightxpixelWidth area.

Implementation

@Deprecated("See [DeviceImage] for a better way to load the image contents.")
Future<Uint8List> getImageBytes(LocalImageProvider localImageProvider,
    int desiredHeight, int desiredWidth) async {
  return await localImageProvider.imageBytes(id!, desiredHeight, desiredWidth,
      compression: compression);
}