How can I read (from disk) and resize an image, in Flutter/Dart

前端 未结 8 670
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-09 08:53

In Flutter/Dart, how can I perform the following 3 steps:

  1. Read an image from disk,
  2. Read its original dimensions (width and height),
  3. Resiz
8条回答
  •  醉话见心
    2020-12-09 09:00

    You can use the dart image package: https://pub.dartlang.org/packages/image.

    The package provide various services such as resize, crop and rotate.

    While this package does work, unfortunately it is very slow.

    See discussion: https://github.com/brendan-duncan/image/issues/55

提交回复
热议问题