我试图获取jpeg图像中像素的RGB值。这是我在2020%放大率下从photoshop拍摄的原始图像的屏幕截图
我在Adobe自己制作了图像(“trial.jpg”),并在图像中放置了一些红色,绿色和蓝色像素,这是一个从(0,0)开始的(30,11)像素网格(即左上角。)
这是我的代码:
for(int i = 0; i < 11; i++) {
for(int j = 0; j < 30; j++)
{
int c = garage.getPixel(j,i);
int red1 = Color.red(c);
int green1 = Color.green(c);
int blue1 = Color.blue(c);
Log.e("PIXEL",j + "/" + i + "= Red: " + red1 +" Green: " + green1 + " Blue: " + blue1);
}
}
我检查日志,但我得到错误的RGB值。我知道这个原因我把红色(255,0,0),蓝色(0,0,255)和绿色(0,255,0)放在那些特定的方块(像素)中。
这是日志:
04-10 03:25:29.171: 0/0= Red: 255 Green: 7 Blue: 0
04-10 03:25:29.171: 1/0= Red: 191 Green: 5 Blue: 1
04-10 03:25:29.171: 2/0= Red: 64 Green: 1 Blue: 3
04-10 03:25:29.171: 3/0= Red: 64 Green: 0 Blue: 5
04-10 03:25:29.171: 4/0= Red: 190 Green: 0 Blue: 8
04-10 03:25:29.171: 5/0= Red: 190 Green: 0 Blue: 7
04-10 03:25:29.175: 6/0= Red: 64 Green: 0 Blue: 2
04-10 03:25:29.175: 7/0= Red: 64 Green: 1 Blue: 0
04-10 03:25:29.175: 8/0= Red: 190 Green: 3 Blue: 0
04-10 03:25:29.175: 9/0= Red: 190 Green: 5 Blue: 0
04-10 03:25:29.175: 10/0= Red: 63 Green: 5 Blue: 0
04-10 03:25:29.175: 11/0= Red: 1 Green: 3 Blue: 1
04-10 03:25:29.175: 12/0= Red: 5 Green: 1 Blue: 3
04-10 03:25:29.179: 13/0= Red: 6 Green: 0 Blue: 3
04-10 03:25:29.179: 14/0= Red: 4 Green: 0 Blue: 1
04-10 03:25:29.179: 15/0= Red: 4 Green: 0 Blue: 0
04-10 03:25:29.179: 16/0= Red: 4 Green: 0 Blue: 0
04-10 03:25:29.179: 17/0= Red: 64 Green: 4 Blue: 0
04-10 03:25:29.179: 18/0= Red: 186 Green: 12 Blue: 0
04-10 03:25:29.179: 19/0= Red: 185 Green: 13 Blue: 0
04-10 03:25:29.179: 20/0= Red: 61 Green: 5 Blue: 0
04-10 03:25:29.179: 21/0= Red: 0 Green: 2 Blue: 0
04-10 03:25:29.179: 22/0= Red: 2 Green: 4 Blue: 0
04-10 03:25:29.179: 23/0= Red: 4 Green: 3 Blue: 0
04-10 03:25:29.179: 24/0= Red: 6 Green: 1 Blue: 1
04-10 03:25:29.179: 25/0= Red: 7 Green: 0 Blue: 1
04-10 03:25:29.179: 26/0= Red: 9 Green: 0 Blue: 0
04-10 03:25:29.179: 27/0= Red: 9 Green: 0 Blue: 0
04-10 03:25:29.179: 28/0= Red: 7 Green: 0 Blue: 1
04-10 03:25:29.179: 29/0= Red: 5 Green: 1 Blue: 3
04-10 03:25:29.179: 0/1= Red: 191 Green: 5 Blue: 2
04-10 03:25:29.179: 1/1= Red: 144 Green: 4 Blue: 3
04-10 03:25:29.179: 2/1= Red: 49 Green: 3 Blue: 3
04-10 03:25:29.179: 3/1= Red: 49 Green: 2 Blue: 4
04-10 03:25:29.179: 4/1= Red: 143 Green: 1 Blue: 6
04-10 03:25:29.179: 5/1= Red: 143 Green: 0 Blue: 5
04-10 03:25:29.179: 6/1= Red: 48 Green: 0 Blue: 1
04-10 03:25:29.179: 7/1= Red: 48 Green: 0 Blue: 0
04-10 03:25:29.179: 8/1= Red: 144 Green: 2 Blue: 0
04-10 03:25:29.179: 9/1= Red: 144 Green: 3 Blue: 0
04-10 03:25:29.179: 10/1= Red: 49 Green: 3 Blue: 0
04-10 03:25:29.179: 11/1= Red: 3 Green: 3 Blue: 0
04-10 03:25:29.179: 12/1= Red: 5 Green: 2 Blue: 2
04-10 03:25:29.179: 13/1= Red: 6 Green: 1 Blue: 3
04-10 03:25:29.179: 14/1= Red: 4 Green: 1 Blue: 1
04-10 03:25:29.179: 15/1= Red: 3 Green: 1 Blue: 0
04-10 03:25:29.179: 16/1= Red: 4 Green: 1 Blue: 0
04-10 03:25:29.179: 17/1= Red: 50 Green: 3 Blue: 1
04-10 03:25:29.183: 18/1= Red: 140 Green: 9 Blue: 3
04-10 03:25:29.183: 19/1= Red: 138 Green: 9 Blue: 3
04-10 03:25:29.183: 20/1= Red: 46 Green: 3 Blue: 2
04-10 03:25:29.183: 21/1= Red: 0 Green: 1 Blue: 1
04-10 03:25:29.183: 22/1= Red: 1 Green: 3 Blue: 0
04-10 03:25:29.187: 23/1= Red: 3 Green: 3 Blue: 0
04-10 03:25:29.187: 24/1= Red: 4 Green: 1 Blue: 2
04-10 03:25:29.187: 25/1= Red: 5 Green: 0 Blue: 3
04-10 03:25:29.187: 26/1= Red: 7 Green: 1 Blue: 1
04-10 03:25:29.187: 27/1= Red: 7 Green: 1 Blue: 1
04-10 03:25:29.187: 28/1= Red: 6 Green: 0 Blue: 1
04-10 03:25:29.187: 29/1= Red: 4 Green: 1 Blue: 2
04-10 03:25:29.187: 0/2= Red: 63 Green: 1 Blue: 8
04-10 03:25:29.187: 1/2= Red: 49 Green: 3 Blue: 7
04-10 03:25:29.187: 2/2= Red: 20 Green: 6 Blue: 4
04-10 03:25:29.187: 3/2= Red: 20 Green: 6 Blue: 3
04-10 03:25:29.187: 4/2= Red: 49 Green: 4 Blue: 2
04-10 03:25:29.187: 5/2= Red: 47 Green: 2 Blue: 1
04-10 03:25:29.187: 6/2= Red: 16 Green: 0 Blue: 0
04-10 03:25:29.187: 7/2= Red: 17 Green: 0 Blue: 0
04-10 03:25:29.187: 8/2= Red: 51 Green: 0 Blue: 0
04-10 03:25:29.187: 9/2= Red: 52 Green: 1 Blue: 0
04-10 03:25:29.187: 10/2= Red: 21 Green: 1 Blue: 0
04-10 03:25:29.187: 11/2= Red: 6 Green: 2 Blue: 0
04-10 03:25:29.187: 12/2= Red: 6 Green: 4 Blue: 0
04-10 03:25:29.187: 13/2= Red: 5 Green: 5 Blue: 1
04-10 03:25:29.187: 14/2= Red: 2 Green: 3 Blue: 2
04-10 03:25:29.187: 15/2= Red: 2 Green: 3 Blue: 2
04-10 03:25:29.187: 16/2= Red: 6 Green: 3 Blue: 0
04-10 03:25:29.187: 17/2= Red: 21 Green: 3 Blue: 3
04-10 03:25:29.187: 18/2= Red: 48 Green: 3 Blue: 9
04-10 03:25:29.187: 19/2= Red: 46 Green: 3 Blue: 10
04-10 03:25:29.187: 20/2= Red: 15 Green: 1 Blue: 8
04-10 03:25:29.187: 21/2= Red: 0 Green: 1 Blue: 5
04-10 03:25:29.187: 22/2= Red: 0 Green: 3 Blue: 1
04-10 03:25:29.187: 23/2= Red: 1 Green: 3 Blue: 1
04-10 03:25:29.187: 24/2= Red: 1 Green: 1 Blue: 5
04-10 03:25:29.187: 25/2= Red: 2 Green: 1 Blue: 6
04-10 03:25:29.187: 26/2= Red: 3 Green: 3 Blue: 4
04-10 03:25:29.187: 27/2= Red: 3 Green: 3 Blue: 2
04-10 03:25:29.187: 28/2= Red: 2 Green: 1 Blue: 1
04-10 03:25:29.187: 29/2= Red: 2 Green: 0 Blue: 0
04-10 03:25:29.187: 0/3= Red: 1 Green: 0 Blue: 10
04-10 03:25:29.187: 1/3= Red: 2 Green: 2 Blue: 8
04-10 03:25:29.187: 2/3= Red: 4 Green: 6 Blue: 4
04-10 03:25:29.187: 3/3= Red: 3 Green: 7 Blue: 1
04-10 03:25:29.187: 4/3= Red: 1 Green: 5 Blue: 0
04-10 03:25:29.187: 5/3= Red: 0 Green: 3 Blue: 0
04-10 03:25:29.187: 6/3= Red: 0 Green: 1 Blue: 0
04-10 03:25:29.187: 7/3= Red: 1 Green: 0 Blue: 0
04-10 03:25:29.187: 8/3= Red: 3 Green: 0 Blue: 2
04-10 03:25:29.187: 9/3= Red: 4 Green: 0 Blue: 3
04-10 03:25:29.187: 10/3= Red: 5 Green: 1 Blue: 4
04-10 03:25:29.187: 11/3= Red: 5 Green: 3 Blue: 4
04-10 03:25:29.187: 12/3= Red: 5 Green: 5 Blue: 2
04-10 03:25:29.187: 13/3= Red: 4 Green: 5 Blue: 2
04-10 03:25:29.187: 14/3= Red: 2 Green: 3 Blue: 3
04-10 03:25:29.187: 15/3= Red: 3 Green: 3 Blue: 2
04-10 03:25:29.187: 16/3= Red: 5 Green: 3 Blue: 1
04-10 03:25:29.187: 17/3= Red: 5 Green: 2 Blue: 5
04-10 03:25:29.187: 18/3= Red: 3 Green: 0 Blue: 13
04-10 03:25:29.187: 19/3= Red: 2 Green: 0 Blue: 15
04-10 03:25:29.187: 20/3= Red: 2 Green: 0 Blue: 9
04-10 03:25:29.187: 21/3= Red: 2 Green: 0 Blue: 5
04-10 03:25:29.187: 22/3= Red: 0 Green: 2 Blue: 3
04-10 03:25:29.187: 23/3= Red: 0 Green: 2 Blue: 3
04-10 03:25:29.187: 24/3= Red: 0 Green: 0 Blue: 5
04-10 03:25:29.187: 25/3= Red: 0 Green: 1 Blue: 6
04-10 03:25:29.187: 26/3= Red: 1 Green: 3 Blue: 6
04-10 03:25:29.187: 27/3= Red: 1 Green: 3 Blue: 4
04-10 03:25:29.187: 28/3= Red: 0 Green: 1 Blue: 1
04-10 03:25:29.187: 29/3= Red: 1 Green: 1 Blue: 0
04-10 03:25:29.187: 0/4= Red: 3 Green: 0 Blue: 9
04-10 03:25:29.187: 1/4= Red: 2 Green: 1 Blue: 7
04-10 03:25:29.187: 2/4= Red: 2 Green: 4 Blue: 2
04-10 03:25:29.187: 3/4= Red: 1 Green: 5 Blue: 0
04-10 03:25:29.187: 4/4= Red: 0 Green: 3 Blue: 0
04-10 03:25:29.187: 5/4= Red: 0 Green: 2 Blue: 0
04-10 03:25:29.191: 6/4= Red: 1 Green: 2 Blue: 0
04-10 03:25:29.191: 7/4= Red: 1 Green: 2 Blue: 2
04-10 03:25:29.191: 8/4= Red: 1 Green: 0 Blue: 6
04-10 03:25:29.191: 9/4= Red: 1 Green: 1 Blue: 10
04-10 03:25:29.191: 10/4= Red: 1 Green: 5 Blue: 13
04-10 03:25:29.191: 11/4= Red: 1 Green: 6 Blue: 12
04-10 03:25:29.191: 12/4= Red: 1 Green: 4 Blue: 8
04-10 03:25:29.191: 13/4= Red: 2 Green: 3 Blue: 5
04-10 03:25:29.191: 14/4= Red: 4 Green: 1 Blue: 3
04-10 03:25:29.191: 15/4= Red: 5 Green: 1 Blue: 2
04-10 03:25:29.191: 16/4= Red: 3 Green: 2 Blue: 3
04-10 03:25:29.191: 17/4= Red: 3 Green: 2 Blue: 8
04-10 03:25:29.191: 18/4= Red: 6 Green: 0 Blue: 17
04-10 03:25:29.191: 19/4= Red: 8 Green: 0 Blue: 17
04-10 03:25:29.191: 20/4= Red: 8 Green: 0 Blue: 7
04-10 03:25:29.191: 21/4= Red: 6 Green: 0 Blue: 3
04-10 03:25:29.191: 22/4= Red: 2 Green: 1 Blue: 5
04-10 03:25:29.191: 23/4= Red: 0 Green: 1 Blue: 5
04-10 03:25:29.191: 24/4= Red: 0 Green: 0 Blue: 4
04-10 03:25:29.191: 25/4= Red: 0 Green: 0 Blue: 4
04-10 03:25:29.191: 26/4= Red: 0 Green: 1 Blue: 6
04-10 03:25:29.191: 27/4= Red: 0 Green: 1 Blue: 6
04-10 03:25:29.191: 28/4= Red: 0 Green: 2 Blue: 2
04-10 03:25:29.191: 29/4= Red: 0 Green: 3 Blue: 0
04-10 03:25:29.191: 0/5= Red: 3 Green: 63 Blue: 6
04-10 03:25:29.191: 1/5= Red: 2 Green: 48 Blue: 5
04-10 03:25:29.191: 2/5= Red: 0 Green: 18 Blue: 2
04-10 03:25:29.191: 3/5= Red: 0 Green: 19 Blue: 0
04-10 03:25:29.191: 4/5= Red: 0 Green: 49 Blue: 0
04-10 03:25:29.191: 5/5= Red: 1 Green: 49 Blue: 0
04-10 03:25:29.191: 6/5= Red: 3 Green: 18 Blue: 1
04-10 03:25:29.195: 7/5= Red: 3 Green: 18 Blue: 3
04-10 03:25:29.199: 8/5= Red: 1 Green: 48 Blue: 7
04-10 03:25:29.199: 9/5= Red: 0 Green: 48 Blue: 10
04-10 03:25:29.199: 10/5= Red: 2 Green: 20 Blue: 14
04-10 03:25:29.199: 11/5= Red: 2 Green: 6 Blue: 13
04-10 03:25:29.199: 12/5= Red: 0 Green: 5 Blue: 9
04-10 03:25:29.199: 13/5= Red: 1 Green: 4 Blue: 5
04-10 03:25:29.199: 14/5= Red: 4 Green: 2 Blue: 3
04-10 03:25:29.199: 15/5= Red: 4 Green: 1 Blue: 2
04-10 03:25:29.199: 16/5= Red: 1 Green: 2 Blue: 3
04-10 03:25:29.199: 17/5= Red: 2 Green: 17 Blue: 7
04-10 03:25:29.199: 18/5= Red: 8 Green: 46 Blue: 14
04-10 03:25:29.199: 19/5= Red: 10 Green: 45 Blue: 13
04-10 03:25:29.199: 20/5= Red: 9 Green: 15 Blue: 5
04-10 03:25:29.199: 21/5= Red: 6 Green: 0 Blue: 2
04-10 03:25:29.199: 22/5= Red: 2 Green: 0 Blue: 5
04-10 03:25:29.199: 23/5= Red: 0 Green: 1 Blue: 5
04-10 03:25:29.199: 24/5= Red: 0 Green: 1 Blue: 2
04-10 03:25:29.199: 25/5= Red: 0 Green: 1 Blue: 2
04-10 03:25:29.199: 26/5= Red: 0 Green: 1 Blue: 5
04-10 03:25:29.199: 27/5= Red: 0 Green: 1 Blue: 5
04-10 03:25:29.199: 28/5= Red: 0 Green: 2 Blue: 1
04-10 03:25:29.199: 29/5= Red: 0 Green: 3 Blue: 0
04-10 03:25:29.199: 0/6= Red: 1 Green: 191 Blue: 2
04-10 03:25:29.199: 1/6= Red: 0 Green: 143 Blue: 2
04-10 03:25:29.199: 2/6= Red: 0 Green: 49 Blue: 2
04-10 03:25:29.199: 3/6= Red: 0 Green: 49 Blue: 1
04-10 03:25:29.199: 4/6= Red: 0 Green: 144 Blue: 0
04-10 03:25:29.199: 5/6= Red: 2 Green: 143 Blue: 0
04-10 03:25:29.199: 6/6= Red: 6 Green: 48 Blue: 1
04-10 03:25:29.199: 7/6= Red: 6 Green: 48 Blue: 2
04-10 03:25:29.199: 8/6= Red: 2 Green: 142 Blue: 2
04-10 03:25:29.199: 9/6= Red: 2 Green: 142 Blue: 4
04-10 03:25:29.199: 10/6= Red: 6 Green: 48 Blue: 6
04-10 03:25:29.199: 11/6= Red: 6 Green: 4 Blue: 6
04-10 03:25:29.199: 12/6= Red: 2 Green: 8 Blue: 3
04-10 03:25:29.199: 13/6= Red: 0 Green: 8 Blue: 2
04-10 03:25:29.199: 14/6= Red: 1 Green: 5 Blue: 3
04-10 03:25:29.199: 15/6= Red: 1 Green: 3 Blue: 2
04-10 03:25:29.199: 16/6= Red: 1 Green: 3 Blue: 1
04-10 03:25:29.199: 17/6= Red: 3 Green: 48 Blue: 2
04-10 03:25:29.199: 18/6= Red: 7 Green: 137 Blue: 4
04-10 03:25:29.199: 19/6= Red: 9 Green: 136 Blue: 5
04-10 03:25:29.199: 20/6= Red: 6 Green: 46 Blue: 3
04-10 03:25:29.199: 21/6= Red: 4 Green: 1 Blue: 2
04-10 03:25:29.199: 22/6= Red: 1 Green: 1 Blue: 3
04-10 03:25:29.199: 23/6= Red: 0 Green: 2 Blue: 2
04-10 03:25:29.199: 24/6= Red: 0 Green: 4 Blue: 1
04-10 03:25:29.199: 25/6= Red: 0 Green: 5 Blue: 0
04-10 03:25:29.199: 26/6= Red: 0 Green: 4 Blue: 1
04-10 03:25:29.199: 27/6= Red: 0 Green: 4 Blue: 1
04-10 03:25:29.199: 28/6= Red: 0 Green: 3 Blue: 0
04-10 03:25:29.199: 29/6= Red: 2 Green: 3 Blue: 0
04-10 03:25:29.199: 0/7= Red: 0 Green: 192 Blue: 1
04-10 03:25:29.199: 1/7= Red: 0 Green: 144 Blue: 2
04-10 03:25:29.199: 2/7= Red: 2 Green: 48 Blue: 2
04-10 03:25:29.199: 3/7= Red: 2 Green: 48 Blue: 2
04-10 03:25:29.199: 4/7= Red: 1 Green: 143 Blue: 1
04-10 03:25:29.199: 5/7= Red: 3 Green: 143 Blue: 1
04-10 03:25:29.199: 6/7= Red: 6 Green: 48 Blue: 1
04-10 03:25:29.199: 7/7= Red: 5 Green: 47 Blue: 1
04-10 03:25:29.199: 8/7= Red: 2 Green: 142 Blue: 0
04-10 03:25:29.199: 9/7= Red: 2 Green: 142 Blue: 0
04-10 03:25:29.203: 10/7= Red: 6 Green: 48 Blue: 2
04-10 03:25:29.203: 11/7= Red: 7 Green: 3 Blue: 2
04-10 03:25:29.203: 12/7= Red: 5 Green: 7 Blue: 0
04-10 03:25:29.203: 13/7= Red: 4 Green: 8 Blue: 0
04-10 03:25:29.203: 14/7= Red: 3 Green: 5 Blue: 2
04-10 03:25:29.203: 15/7= Red: 2 Green: 3 Blue: 2
04-10 03:25:29.203: 16/7= Red: 1 Green: 3 Blue: 0
04-10 03:25:29.203: 17/7= Red: 2 Green: 48 Blue: 0
04-10 03:25:29.203: 18/7= Red: 5 Green: 139 Blue: 0
04-10 03:25:29.203: 19/7= Red: 6 Green: 138 Blue: 1
04-10 03:25:29.203: 20/7= Red: 4 Green: 47 Blue: 2
04-10 03:25:29.203: 21/7= Red: 2 Green: 1 Blue: 2
04-10 03:25:29.203: 22/7= Red: 0 Green: 1 Blue: 4
04-10 03:25:29.203: 23/7= Red: 0 Green: 2 Blue: 3
04-10 03:25:29.203: 24/7= Red: 0 Green: 5 Blue: 1
04-10 03:25:29.203: 25/7= Red: 0 Green: 6 Blue: 0
04-10 03:25:29.203: 26/7= Red: 0 Green: 5 Blue: 0
04-10 03:25:29.203: 27/7= Red: 0 Green: 4 Blue: 0
04-10 03:25:29.203: 28/7= Red: 0 Green: 3 Blue: 0
04-10 03:25:29.203: 29/7= Red: 2 Green: 2 Blue: 0
04-10 03:25:29.203: 0/8= Red: 0 Green: 67 Blue: 5
04-10 03:25:29.203: 1/8= Red: 1 Green: 50 Blue: 4
04-10 03:25:29.203: 2/8= Red: 5 Green: 17 Blue: 3
04-10 03:25:29.203: 3/8= Red: 6 Green: 16 Blue: 3
04-10 03:25:29.203: 4/8= Red: 5 Green: 47 Blue: 3
04-10 03:25:29.203: 5/8= Red: 4 Green: 48 Blue: 2
04-10 03:25:29.203: 6/8= Red: 3 Green: 17 Blue: 1
04-10 03:25:29.203: 7/8= Red: 1 Green: 17 Blue: 0
04-10 03:25:29.203: 8/8= Red: 0 Green: 48 Blue: 0
04-10 03:25:29.203: 9/8= Red: 0 Green: 48 Blue: 0
04-10 03:25:29.203: 10/8= Red: 2 Green: 19 Blue: 0
04-10 03:25:29.203: 11/8= Red: 5 Green: 4 Blue: 0
04-10 03:25:29.203: 12/8= Red: 10 Green: 3 Blue: 0
04-10 03:25:29.203: 13/8= Red: 12 Green: 2 Blue: 0
04-10 03:25:29.203: 14/8= Red: 11 Green: 1 Blue: 0
04-10 03:25:29.203: 15/8= Red: 7 Green: 1 Blue: 0
04-10 03:25:29.203: 16/8= Red: 2 Green: 2 Blue: 0
04-10 03:25:29.203: 17/8= Red: 0 Green: 19 Blue: 0
04-10 03:25:29.203: 18/8= Red: 1 Green: 52 Blue: 2
04-10 03:25:29.203: 19/8= Red: 2 Green: 52 Blue: 3
04-10 03:25:29.203: 20/8= Red: 1 Green: 18 Blue: 1
04-10 03:25:29.203: 21/8= Red: 0 Green: 1 Blue: 3
04-10 03:25:29.203: 22/8= Red: 0 Green: 0 Blue: 8
04-10 03:25:29.203: 23/8= Red: 0 Green: 1 Blue: 8
04-10 03:25:29.203: 24/8= Red: 0 Green: 4 Blue: 2
04-10 03:25:29.203: 25/8= Red: 0 Green: 4 Blue: 0
04-10 03:25:29.203: 26/8= Red: 0 Green: 2 Blue: 2
04-10 03:25:29.203: 27/8= Red: 0 Green: 1 Blue: 2
04-10 03:25:29.203: 28/8= Red: 0 Green: 2 Blue: 0
04-10 03:25:29.203: 29/8= Red: 1 Green: 2 Blue: 0
04-10 03:25:29.203: 0/9= Red: 0 Green: 4 Blue: 5
04-10 03:25:29.203: 1/9= Red: 1 Green: 3 Blue: 4
04-10 03:25:29.203: 2/9= Red: 5 Green: 1 Blue: 3
04-10 03:25:29.203: 3/9= Red: 6 Green: 0 Blue: 2
04-10 03:25:29.203: 4/9= Red: 6 Green: 0 Blue: 2
04-10 03:25:29.207: 5/9= Red: 4 Green: 0 Blue: 2
04-10 03:25:29.207: 6/9= Red: 1 Green: 1 Blue: 0
04-10 03:25:29.207: 7/9= Red: 0 Green: 2 Blue: 0
04-10 03:25:29.207: 8/9= Red: 0 Green: 2 Blue: 2
04-10 03:25:29.207: 9/9= Red: 0 Green: 3 Blue: 2
04-10 03:25:29.207: 10/9= Red: 0 Green: 4 Blue: 0
04-10 03:25:29.207: 11/9= Red: 3 Green: 4 Blue: 0
04-10 03:25:29.207: 12/9= Red: 9 Green: 1 Blue: 1
04-10 03:25:29.207: 13/9= Red: 12 Green: 0 Blue: 1
04-10 03:25:29.207: 14/9= Red: 11 Green: 1 Blue: 0
04-10 03:25:29.207: 15/9= Red: 7 Green: 1 Blue: 0
04-10 03:25:29.207: 16/9= Red: 2 Green: 1 Blue: 0
04-10 03:25:29.207: 17/9= Red: 0 Green: 3 Blue: 1
04-10 03:25:29.207: 18/9= Red: 1 Green: 7 Blue: 2
04-10 03:25:29.207: 19/9= Red: 1 Green: 8 Blue: 2
04-10 03:25:29.207: 20/9= Red: 0 Green: 4 Blue: 0
04-10 03:25:29.207: 21/9= Red: 0 Green: 1 Blue: 2
04-10 03:25:29.207: 22/9= Red: 1 Green: 0 Blue: 7
04-10 03:25:29.207: 23/9= Red: 1 Green: 1 Blue: 7
04-10 03:25:29.207: 24/9= Red: 0 Green: 3 Blue: 2
04-10 03:25:29.207: 25/9= Red: 0 Green: 3 Blue: 1
04-10 03:25:29.207: 26/9= Red: 0 Green: 1 Blue: 3
04-10 03:25:29.207: 27/9= Red: 0 Green: 0 Blue: 3
04-10 03:25:29.207: 28/9= Red: 0 Green: 2 Blue: 1
04-10 03:25:29.207: 29/9= Red: 1 Green: 2 Blue: 0
04-10 03:25:29.207: 0/10= Red: 0 Green: 4 Blue: 1
04-10 03:25:29.207: 1/10= Red: 0 Green: 3 Blue: 1
04-10 03:25:29.207: 2/10= Red: 1 Green: 2 Blue: 1
04-10 03:25:29.207: 3/10= Red: 3 Green: 1 Blue: 0
04-10 03:25:29.207: 4/10= Red: 6 Green: 0 Blue: 0
04-10 03:25:29.207: 5/10= Red: 5 Green: 1 Blue: 0
04-10 03:25:29.207: 6/10= Red: 1 Green: 2 Blue: 0
04-10 03:25:29.207: 7/10= Red: 0 Green: 4 Blue: 2
04-10 03:25:29.207: 8/10= Red: 2 Green: 6 Blue: 7
04-10 03:25:29.207: 9/10= Red: 2 Green: 6 Blue: 7
04-10 03:25:29.207: 10/10= Red: 0 Green: 5 Blue: 2
04-10 03:25:29.207: 11/10= Red: 1 Green: 3 Blue: 1
04-10 03:25:29.207: 12/10= Red: 3 Green: 2 Blue: 3
04-10 03:25:29.207: 13/10= Red: 4 Green: 2 Blue: 3
04-10 03:25:29.207: 14/10= Red: 3 Green: 3 Blue: 1
04-10 03:25:29.207: 15/10= Red: 2 Green: 3 Blue: 0
04-10 03:25:29.211: 16/10= Red: 0 Green: 1 Blue: 1
04-10 03:25:29.211: 17/10= Red: 1 Green: 1 Blue: 1
04-10 03:25:29.211: 18/10= Red: 5 Green: 4 Blue: 1
04-10 03:25:29.211: 19/10= Red: 5 Green: 5 Blue: 0
04-10 03:25:29.211: 20/10= Red: 1 Green: 3 Blue: 0
04-10 03:25:29.211: 21/10= Red: 0 Green: 2 Blue: 0
04-10 03:25:29.211: 22/10= Red: 1 Green: 0 Blue: 2
04-10 03:25:29.211: 23/10= Red: 1 Green: 0 Blue: 2
04-10 03:25:29.211: 24/10= Red: 0 Green: 1 Blue: 0
04-10 03:25:29.211: 25/10= Red: 0 Green: 1 Blue: 0
04-10 03:25:29.211: 26/10= Red: 0 Green: 1 Blue: 2
04-10 03:25:29.211: 27/10= Red: 1 Green: 1 Blue: 2
04-10 03:25:29.211: 28/10= Red: 2 Green: 3 Blue: 1
04-10 03:25:29.211: 29/10= Red: 2 Green: 3 Blue: 1
我尝试将其保存在8bitJpeg ...和16bitJpeg中...但我得到的值是错误的。有人可以帮助我,并解释一下为什么会发生这种情况?
例如4thRow,第1个像素(即0,3)是Green = 0,255,0。
但其日志显示“0/3 =红色:1绿色:0蓝色:10”
答案 0 :(得分:0)
我终于成功解决了问题中最令人费解的部分。
通过不同的压缩方法保存jpeg会改变您设置像素的RGB内容。因此,像.png
PS中图像的完全放大显示许多小网格。虽然它说30x11 ..它实际上是双倍的。这意味着长度加倍,宽度加倍。 所以我用像素制作的真实图像是60x22。所以很明显我在网格上看到的(0,3)GREEN,实际上是4像素(0,6)(0,7)(1,6)(1,7)