我想知道如何在java中將int數組構造成緩衝圖像。我知道你可以通過做在int中將int數組轉換爲bufferedImage
int[] srcpixels = ((DataBufferInt)in.getRaster().getDataBuffer()).getData();
獲得Java中的int數組,但我不知道該怎麼做它的其他方式。我需要這個應用魚眼效果的緩衝圖像,我發現如何在這裏做http://popscan.blogspot.com/2012/04/fisheye-lens-equation-simple-fisheye.html但它只適用於int數組。請幫忙,謝謝。
有沒有'setRaster()' - 方法? –
我不這麼認爲 – popgalop