Image 如何在颤振中更改图像的RGB配置
我想在资产图像上放置一个颜色过滤器。 如下所示,我目前有一个带有colorBlendMode过滤器的图像,但我希望能够直接修复图像每个像素的RGB值。 有人知道如何做到这一点吗Image 如何在颤振中更改图像的RGB配置,image,image-processing,flutter,dart,Image,Image Processing,Flutter,Dart,我想在资产图像上放置一个颜色过滤器。 如下所示,我目前有一个带有colorBlendMode过滤器的图像,但我希望能够直接修复图像每个像素的RGB值。 有人知道如何做到这一点吗 body: Center( child: new Image.asset( 'assets/gallery/garrowby_hill.jpg', width: size.width, height: size.height,
body: Center(
child: new Image.asset(
'assets/gallery/garrowby_hill.jpg',
width: size.width,
height: size.height,
fit: BoxFit.fill,
color: Color.fromRGBO(redCount, greenCount, blueCount, 1),
colorBlendMode: BlendMode.multiply,
),
),
您可以使用ColorFiltered类,将图像用作子级,并使用colorFilter属性, 待办事项: