load method

  1. @override
Future<ImagePipelineAsset> load(
  1. File file
)
override

Implementation

@override
Future<ImagePipelineAsset> load(File file) async {
  MagickWand wand = MagickWand.newMagickWand();
  List<dynamic> r = await Future.wait(
      [wand.magickReadImage(file.path), MagickCLI.identify(file)]);
  ImageProperties properties = r[1] as ImageProperties;

  return ImagePipelineAsset(
      src: file,
      format: properties.format,
      properties: properties,
      wand: wand);
}