This discussion is archived
5 Replies Latest reply: Jun 28, 2012 10:27 AM by jsmith RSS

Display TIF image windows 7

943372 Newbie
Currently Being Moderated
Hi,

is it possible display a tif image with javafx 2 on windows 7? If yes, how?

Regards
Oliver
  • 1. Re: Display TIF image windows 7
    jsmith Guru
    Currently Being Moderated
    You can read the TIF image into an AWT image using Java Advanced Imaging (JAI) API and then convert the AWT image to a JavaFX image using the JavaFX 2.2 SwingFXUtils.toFXImage() method or (if you don't want to use any AWT code) you can write your own TIF image decoder and write the decoder output directly to a JavaFX 2.2 WritableImage.

    http://www.rgagnon.com/javadetails/java-0605.html "Display a TIF" (using JAI + AWT).
  • 2. Re: Display TIF image windows 7
    gimbal2 Guru
    Currently Being Moderated
    be wary of advising people to use JAI, its not exactly an API that still has a strong presence on the net. Case in point: that article you link to has two download links which are both broken.
  • 3. Re: Display TIF image windows 7
    943372 Newbie
    Currently Being Moderated
    Thanks. I will try it.
  • 4. Re: Display TIF image windows 7
    bouye Journeyer
    Currently Being Moderated
    There used to be somewhere on the JAI page a link to the JAI Image I/O tools which was a subset of JAI and a separate download that you could add to your classpath and that automatically added new files formats supports into ImageIO. Thus no single line of JAI coding was required at all, you could just simply use the regular ImageIO methods.

    Since the JAI project has moved out of Sun's to java.net limbo, I am not sure were the download went but should be around here http://java.net/projects/jai-imageio/
  • 5. Re: Display TIF image windows 7
    jsmith Guru
    Currently Being Moderated
    be wary of advising people to use JAI, its not exactly an API that still has a strong presence on the net
    Thanks for pointing out concerns with JAI gimbal. I have not used JAI myself, so it is good to have your perspective.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points