Java can display png, jpg a some other picture formats, but i have to display a bmp file in a JLable by getting the file path.
ImageIcon imageIcon = new ImageIcon(imageFile.getAbsolutePath());
ImageIcon support the typical png,gif,jpg
images.
In the project i am working, i can not open a bmp file and store the same file as a jpg, because i am not allow to store something at runtime. I could only generate the image in hold it in memory. But i dont know how to do this.
How can i show BMP
in Java
1.4
?
Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…