hi

I am trying to display an image using ImageIcon using byte array of image :

imgIconBuf = imageBuf.getBytes();
System.out.println("Length of buf:"+imgIconBuf.length);
icon = new ImageIcon(imgIconBuf,"hello");
System.out.println("Icon Height"+icon.getIconHeight());
System.out.println("Image Load Status:"+icon.getImageLoadStatus());
f.getContentPane().add(new JLabel(icon));
f.setvisible(true);

but image is not displayed and I get icon height as -1

Kindly help

Thanks