Created
May 28, 2019 07:27
-
-
Save plateaukao/ef4a7f07b453ff130434f5581ecfdd07 to your computer and use it in GitHub Desktop.
dart_compute
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static Image processImage(Image srcImage) { | |
return srcImage.replaceColor(Colors.white, Colors.transparent); | |
} | |
Image _getTransparentBackgroundImage(Image srcImage) async { | |
Image resultImage = await compute(processImage, srcImage); | |
return resultImae; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment