2
我試圖關注Image Processing – Tint Color (Yet Another) Tutorial,但我不明白一些代碼。我只知道度數會影響音色數量的一件事。你能向我解釋一下嗎?Android上的着色圖像處理
以下是我不理解的代碼:
int index = y * width + x;
int r = (pix[index] >> 16) & 0xff;
int g = (pix[index] >> 8) & 0xff;
int b = pix[index] & 0xff;
RY = (70 * r - 59 * g - 11 * b)/100;
GY = (-30 * r + 41 * g - 11 * b)/100;
BY = (-30 * r - 59 * g + 89 * b)/100;
Y = (30 * r + 59 * g + 11 * b)/100;
RYY = (S * BY + C * RY)/256;
BYY = (C * BY - S * RY)/256;
GYY = (-51 * RYY - 19 * BYY)/100;
真的很感謝您的解釋><!你讓我很快樂 :)) – Yoo 2012-03-07 07:28:13