Hello, I am trying to write a viewer that is able to read/display bmp, jpg,
gif and png files. Currently, my program is unable to read bmp files! Help!
ImageIcon ii = new ImageIcon(str);
CustomScrollPane sp = new CustomScrollPane(new JLabel(ii));
where did i go wrong... using the above code i am able to read jpg, gif and
png!
Andrew Thompson - 07 Oct 2005 07:29 GMT
> Hello, I am trying to write a viewer that is able to read/display bmp, jpg,
> gif and png files. Currently, my program is unable to read bmp files!
PNG, JPEG and GIF are supported. BMP is not. To read
Windows (and other more specialist) formats, you will
need to turn to something like JAI.
Of course, if you control the BMP's, you might convert
them to one of the three formats that the core classes
understand.