• Post Reply Bookmark Topic Watch Topic
  • New Topic

Import an image  RSS feed

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure if I'm reading out of date tutorials. I want to import an image to resize but not sure how to start of.
Should I be using the "BufferedImage & ImageIO.read" method or the "paint(Graphics g) { Image img1 = Toolkit.getDefaultToolkit().getImage" method?
Would be grateful for some guidance before I start to try coding.

 
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ImageIO is almost certainly the way to go. What kind of code is this - a desktop app? Where does the image come from, meaning, what does "import" mean?
 
Sid Dixon
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes it's for a desktop application. It will be reading an image from the desk top / CD rom.
Thanks for the advice.
 
Marshal
Posts: 56600
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you should be able to find about images in the 2DGraphics part of the Java Tutorials. “Image” appears about three or four times in that section.
 
Sid Dixon
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the link Campbell - that's what I've been looking for.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!