• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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
 
And tomorrow is the circus! We can go to the circus! I love the circus! We can take this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic