我自己用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
我试着用8位Jpeg格式保存它...和16位Jpeg...但是我得到的价值观是错误的。谁能帮我一下,解释一下为什么会这样?
例如,第四行第一个像素(即0,3)为绿色=0255,0。
但它的日志显示“0/3=红色:1绿色:0蓝色:10”
我终于设法破解了问题中最令人费解的部分。
>
通过不同的压缩方法保存jpeg会改变您设置像素的RGB内容。因此,使用像.png这样的无损格式更安全
在PS中完全放大图像会显示许多小网格。所以虽然它说30x11.它实际上是双重的。所以这意味着长度加倍,宽度加倍。所以我用像素制作的真实图像是60x22。因此,很明显,我在网格上看到的(0,3)GREEN实际上是(0,6)(0,7)(1,6)(1,7)的真实图像上的4个像素
问题内容: 我的android应用程序drawable文件夹中有一个jpg图像,分辨率为1000x600。我像这样将图像加载到位图 之后,我打电话返回1500。怎么回事?以及如何获得正确的图像宽度和高度? 问题答案: 这可能是因为密度不同。您的资源可能存储在中等密度的文件夹中,但设备为hdpi。中密度为160dpi,高密度为240dpi。因此,您的位图将缩放为原始大小的1.5倍。有关更多信息,请参
问题内容: 我在一个开始从事的项目中遇到了这段代码。原始开发人员不再可用,我对此一无所知: 产生值为。这是如何运作的? 什么是运算符? 什么是运算符? 什么是运算符? 什么是运算符? 问题答案: 什么是运算符? 那是两个运算符,一个是赋值运算符,一个是一元加号,它什么都不做。 您是否输入错了并表示compund赋值运算符? 什么是运算符? 还有两个运算符,一个为后递增,一个为加法(根据最大划分规则
在本地开发环境中使用Eclipse(Mars.1发行版(4.5.1))中的Forge 1.8.9。 在环游世界一小段时间后,然后注销该世界并返回(同一个会话中,退出并关闭MC),世界将无法出现在控制台中。该位置与“一切正常”登录中的位置相同。另外还有一个错误的位置!错误 控制台的错误如下: 我已经尝试过一些变化,包括Minecraft Forge:使用正确的连接游戏侦听器进行设置位置和角度,但不使
基类控制器里有error方法,用于api的错误消息返回输出 /** * 操作错误跳转的快捷方法 * @access protected * @param mixed $msg 提示信息,若要指定错误码,可以传数组,格式为['code'=>您的错误码,'msg'=>'您的错误消息'] * @param mixed $data 返回的数据 * @par
问题内容: 我正在通过Ajax将幻灯片(Jquery Ui Slider)中的每个滑块值传递到我的Controller。 Slider + Ajax看起来像这样: 因此,我确实有这样的想法: 我的路线如下所示: 在我的Controller方法中,我这样调用它: Log :: info($ sliderValue)告诉我,我确实在每张幻灯片上都获得了正确的滑块值。 当我尝试返回到编辑视图时,在控制台
我写了一个二分搜索的递归程序,正如你所看到的,我试图在给定的数组中找到目标=21的位置,然后返回位置为2。但是,我的输出是1。当我调试它匹配att arr[start]=target时,它直接跳到findTheNumber(arr,mid+1,end,target)行;然后下一行,然后返回mid..只是想知道为什么我的返回在“返回开始”时中断了 }