4

I was having a problem where my image analysis program would crash whenever I used TIFF images. I found that the problem was that BufferedImage img = ImageIO.read(file) was returning null, even though the file existed. With some extra research, I found that the ImageIO class doesn't support TIFF images by default, but that the Java Advanced Imaging JARS would fix my problem. I was wondering how I could get JAI working under eclipse (for windows) so that I could use my program. I've done some searching, bu there is no clear guide that I can find.

Alternatively, if there is a different class/method for reading images into BufferedImage objects, I could use that. I even have the program detecting the file extension so if it works only for TIFF files that's fine.

rishubk
  • 441
  • 2
  • 8
  • 19
Thomas Woltjer
  • 363
  • 1
  • 4
  • 12
  • 1
    You can download TIFF extentions for `ImageIO` [here](http://www.oracle.com/technetwork/java/current-142188.html) (under the section Java Advanced Imaging-Image I/O Tools Downloads). You need to place these in the `ext` directory of your JRE and then load away, although it won't support all TIFF variations...(it appears the downloads have moved to [here](https://java.net/projects/imageio) :P) – MadProgrammer Jul 22 '15 at 05:20
  • 1
    PS: You also try [the TIFF plugin](http://haraldk.github.io/TwelveMonkeys/#aldusadobe-tagged-image-file-format-tiff) from my TwelveMonkeys library. – Harald K Jul 24 '15 at 18:09

1 Answers1

4

We can use ImageIO class to read and display TIFF images.. Click here to see if this helps..Found in one more thread.

Community
  • 1
  • 1
Kalpana
  • 491
  • 1
  • 7
  • 21
  • I don't think you should post a link to a different question asking the same thing, instead it's more appropriate to flag as duplicate. – Harald K Jul 24 '15 at 15:15