看板 java 關於我們 聯絡資訊
: for(int x=0;x<picture.getWidth();x++) { : for (int y = 0; y < picture.getHeight(); y++) { : picture2.setPixel(x,y,Color.argb(Color.alpha(0), : Color.red(picture.getPixel(x, y)), ↑↑ : Color.red(picture.getPixel(x, y)), ↑↑ : Color.red(picture.getPixel(x, y))));}} ↑↑ : ... : 出來的結果應該有顏色的地方卻都變成黑色(形狀還在) Color.argb( Alpha , Red , Green , Blue ); 你的 Red , Green , Blue 都設定為一樣的值,當然出來是灰色或黑色啦... 我一開始還以為你的程式碼是要轉灰階 @@ -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 36.238.134.227 ※ 文章網址: https://www.ptt.cc/bbs/java/M.1450510353.A.330.html