I want to create an image icon, but not from a jpg or gif file. Rather, I have a 2d array of bytes that I want to display on a canvas. ImageIcon has a constructor that takes byte but only if that array was "read from an image file containing a supported image format". Is there a way to do this? Brian Tarbox
Ko Ko Naing
posted 13 years ago
By the way, where did u get the 2D array of bytes? Is it sure that the array you have represents a certain kind of ImageIcon? If not, even tough we construct an ImageIcon using that array, we will not be able to see the icon...
Co-author of SCMAD Exam Guide, Author of JMADPlus SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0