You should install JAI for java in your machine or you should refer to the library in you project.
You should import javax.media.jai.* library to have following functions.
If you want to show a tiff stored in your local machine.
RenderedImage image = JAI.create("fileload", filename);
When you want to get a TIFF from server you can use following method.
RenderedImage image = JAI.create("url", u);Here "u" is url to the tiff you refer. For example the url can be "http://www.kasun.com/mytest.tiff". There is a url class under java.net library.
No comments:
Post a Comment