wood burning stoves*
The moose likes Swing / AWT / SWT and the fly likes Displaying .TIF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Displaying .TIF" Watch "Displaying .TIF" New topic

Displaying .TIF

Ken Blair
Ranch Hand

Joined: Jul 15, 2003
Posts: 1078
I don't know too much about Swing/AWT and I need to display and manipulate a .tif file. I just need to be able to zoom in and out (not user controlled), I can't seem to find anything in java that supports .tif.
Ken Blair
Ranch Hand

Joined: Jul 15, 2003
Posts: 1078
aghhhhhhhhhhhhhh I don't understand JAI *cry*
I would greatly appreciate a good tutorial if it exists.
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

Here's a section from Sun's tutorial on JAI about loading TIFF images.

If you want to look at the rest of the tutorial there's a "Contents" link at the top of the page in the link...

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Ken Blair
Ranch Hand

Joined: Jul 15, 2003
Posts: 1078
Yeah I've been looking at that and some demos and I seem to have gotten enough to do what I need. The biggest problem with that tutorial (and that's about the only one out there) is it's outdated, even the very first example uses the deprecated ScrollingImagePanel.
Also, if anyone ever happens to search the forums (as I did) for something like this there's an article on JAI at http://access1.sun.com/techarticles/ImagingApps/JImage.html
You can convert a PlanarImage to a BufferedImage and then go from there using the JFC.
[ August 04, 2003: Message edited by: Ken Blair ]
It is sorta covered in the JavaRanch Style Guide.
subject: Displaying .TIF
Similar Threads
Problem Opening File with .TIF Extension
Image online conversion with java script
Multi display Applet
Problem regarding logo
compressed Tiff