• Post Reply Bookmark Topic Watch Topic
  • New Topic

Supported Image Types

 
simon keillor
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a JLayeredPane to which I add JLables containg images, effectively allowing images to be dragged around the screen.

So far I have only been able to get GIFs and JPEGs to display - is there anywhere I can abtain a list of which image types I can use?

Regards

Simon
 
Darin Niard
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Toolkit's createImage() currently only supports GIF, JPEG, and PNG (since 1.3).

The javax.imageio package can do pretty much anything as long as you have the appropriate plugins installed for it.

In JRE 1.5, javax.imageio supports JPG, PNG, BMP, WBMP, and GIF. Prior to 1.5, neither BMP format is supported, I believe.
 
Ken Blair
Ranch Hand
Posts: 1078
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java Advanced Imaging (JAI) gives access to many different file types such as .TIF as well. You can find information and the download at http;//java.sun.com
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!