Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Image class in Java APIs  RSS feed

 
Gupta Nitin
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to you give the file name to Image class? From the APIs i could not see any constructor of BufferedImage class taking a filename... Is there any other class to handle images in Java? Please help
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The javax.imageio.ImageIO class is the standard way of reading image files into memory. Its "read" methods can create BufferedImages from files.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!