Image 从图像中获取像素的颜色
我试图得到图像中像素的颜色 通过Image 从图像中获取像素的颜色,image,image-processing,colors,dart,pixel,Image,Image Processing,Colors,Dart,Pixel,我试图得到图像中像素的颜色 通过包的Image类:Image/Image.dart包,我可以访问给定坐标x和y处的像素 这给了我一个整数 如何从中获取颜色?您可以使用 int c1 = image.getPixel(x, y); int r1 = getRed(c1); int g1 = getGreen(c1); int b1 = getBlue(c1); int a1 = getAlpha(c1); 另见示例
包的Image类:Image/Image.dart
包,我可以访问给定坐标x和y处的像素
这给了我一个整数
如何从中获取颜色?您可以使用
int c1 = image.getPixel(x, y);
int r1 = getRed(c1);
int g1 = getGreen(c1);
int b1 = getBlue(c1);
int a1 = getAlpha(c1);
另见示例