M
mark jason
hi
I was trying out some ImageIO methods on various types of image
files.When I tried getImageReaders() on ImageInputStream created with
jpeg,png files ,I could get at least one ImageReader.But it failed
when I used tiff images from http://www.fileformat.info/format/tiff/sample/index.htm
as well as those in JAFFE database.Can someone tell me why this
happens?
thanks
mark.
public static void checkImage(String name) throws IOException{
ImageInputStream imginstream = ImageIO.createImageInputStream(new
FileInputStream(name));
Iterator<ImageReader> iter = ImageIO.getImageReaders(imginstream);
if (iter.hasNext()) {
System.out.println("at least one image reader exists for " + name);
}else{
System.out.println("No image reader exists for " + name);
}
}
when I tried a .tiff file I got
No image reader exists for KLHA1158.tiff
I was trying out some ImageIO methods on various types of image
files.When I tried getImageReaders() on ImageInputStream created with
jpeg,png files ,I could get at least one ImageReader.But it failed
when I used tiff images from http://www.fileformat.info/format/tiff/sample/index.htm
as well as those in JAFFE database.Can someone tell me why this
happens?
thanks
mark.
public static void checkImage(String name) throws IOException{
ImageInputStream imginstream = ImageIO.createImageInputStream(new
FileInputStream(name));
Iterator<ImageReader> iter = ImageIO.getImageReaders(imginstream);
if (iter.hasNext()) {
System.out.println("at least one image reader exists for " + name);
}else{
System.out.println("No image reader exists for " + name);
}
}
when I tried a .tiff file I got
No image reader exists for KLHA1158.tiff