2012-09-28 48 views
1

我想編寫以字節爲單位的圖像並以字節爲單位返回圖標的函數。我嘗試在谷歌搜索,但我還沒有找到任何相關的信息。如何將圖像轉換爲java中的圖標?

private byte[] ImageToIcon(byte[] image) 
{ 

} 
+1

java.awt.Icon'或OS圖標? – MadProgrammer

+1

檢查它。 http://stackoverflow.com/questions/5830533/how-can-i-convert-an-icon-to-an-image – swemon

+0

此鏈接即將轉換圖標爲image.I沒有找到任何有關我的問題的信息。 –

回答

1

使用:

ImageIcon icon = new ImageIcon(img); 

我發現我的解決方案。

相關問題