• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

How do I read .ico files in java and put in as icon for the frame

 
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
I can read gif,jpg files in java and put it into an Image/BufferedImage/ImageIcon object say by the code(one for frame and one for applet):

or

But how do I read .ico files?
Can I read bmp files in java?
thanks in advance
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As far as I know, the current API's for reading image files do not allow reading .ico or .bmp files. With that being said, there is probably a way, but you may have to hunt for 3rd party API's or create your own process using I/O. You will really have to know the nitty gritty of how .ico and how .bmp files are written, compressed, and stored in order to tear them apart and re-build them.

------------------
Happy Coding,
Gregg Bolinger
reply
    Bookmark Topic Watch Topic
  • New Topic