ImageIconpublic ImageIcon(byte[] imageData)Creates an ImageIcon from an array of bytes which were read from an image file containing a supported image format, such as GIF or JPEG. Normally this array is created by reading an image using Class.getResourceAsStream(), but the byte array may also be statically stored in a class. If the resulting image has a "comment" property that is a string, then the string is used as the description of this icon.
嘗試下是否能把你的數據作爲數據流傳進某個操作類中
Memoryimagesource = new MemoryImageSource(width,height,model,pix,0,width);
image=createImage(memoryimagesource);
把图象显示出来
最后把参考如何保存为位图文件的方式
即 你要了解位图文件的头文件格式和信息
BMPFileHeader和BMPInfoHeader
最后
BMPCodec.createBMPEncoder(new FileOutputStream("C:\\house\\test.bmp")).encode(image);
就可以了