Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

reading an image file

  Asked By: Ankur    Date: Oct 22    Category: Java    Views: 2753
  

I wrote a java code to read an image file in netbeans. it compiled well no errors, but its not showing the image whose path i had declared in the program.

package javaimageiotest;

import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;

public class JavaImageIOTest
{

public JavaImageIOTest()
{
try
{
// the line that reads the image file
BufferedImage image = ImageIO.read(new File("C:\\Users\\KAISER\\Desktop\\abc.jpg"));
// work with the image here ...
}
catch (IOException e)
{
// log the exception
// re-throw if desired
}
}

public static void main(String[] args)
{
new ImageIOTest();
}

}
this is my code. any ideas or alternate way out needed. thnku :)

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on reading an image file Or get search suggestion and latest updates.




Tagged: