2 Replies - 1299 Views - Last Post: 25 October 2011 - 10:32 PM Rate Topic: -----

#1 aelynne  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 25-October 11

Open an image in Java

Posted 25 October 2011 - 09:39 PM

Hello, i want to know how to open an image in java? For example, I already have an image .jpg, and i need to open it in java so taht i can do the image processing. Anybody can help me?
Is This A Good Question/Topic? 0
  • +

Replies To: Open an image in Java

#2 Sheph  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 447
  • View blog
  • Posts: 1,032
  • Joined: 12-October 11

Re: Open an image in Java

Posted 25 October 2011 - 10:06 PM

You can use the Image class or BufferedImage class.

http://download.orac...ages/index.html
Was This Post Helpful? 0
  • +
  • -

#3 aelynne  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 25-October 11

Re: Open an image in Java

Posted 25 October 2011 - 10:32 PM

Is it my code correct?

import java.awt.Image
import java.awt.image.BufferedImage

public class BufferedImage
public abstract class Image
  
BufferedImage img = null;
try {
    img = ImageIO.read(new File("sign.jpg"));
} catch (IOException e) {
}

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1