代码拉取完成,页面将自动刷新
用于编辑及显示原始像素格式(rgba)图片的库.
完整代码参考example
// 生成ImageProvider
BufferImage bufferImage = BufferImage(100, 100);
for (int i = 0; i < 100; i++) {
for (int j = 0; j < 100; j++) {
bufferImage.setColor(
i, j, Colors.primaries[(i * 100 + j) % Colors.primaries.length]);
}
}
image = RgbaImage.fromBufferImage(bufferImage, scale: 1);
bufferImage.resize(2);
scaleImage = RgbaImage.fromBufferImage(bufferImage, scale: 1);
// 显示Image
Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
Image(
image: image,
),
Image(
image: scaleImage,
),
],
),
)
This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。