Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/383.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/234.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在java android中循环遍历每个像素_Java_Android - Fatal编程技术网

在java android中循环遍历每个像素

在java android中循环遍历每个像素,java,android,Java,Android,我想在Android上比较jpg文件A和文件B中的每个像素。图像具有相同的hxw。Android不支持awt的BuffereImage。建议?伪代码: for (int x = 0; x < a.getWidth(); x++) { for(int y = 0; y < a.getHeight(); y++) { int rgb = a.getRGB(x, y); int rgb2 = b.getRGB(x, y); ...

我想在Android上比较jpg文件A和文件B中的每个像素。图像具有相同的hxw。Android不支持awt的BuffereImage。建议?伪代码:

for (int x = 0; x < a.getWidth(); x++) {
    for(int y = 0; y < a.getHeight(); y++) {
        int rgb = a.getRGB(x, y);
        int rgb2 = b.getRGB(x, y);
        ...
    }
}
for(int x=0;x
您可能想看看使用位图的。getPixels公共无效getPixels(int[]像素,int偏移,int跨距,int x,int y,int宽度,int高度)