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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "calling .TIF image in Swing" Watch "calling .TIF image in Swing" New topic
Author

calling .TIF image in Swing

Nagaseshagiri poola
Greenhorn

Joined: Oct 18, 2003
Posts: 25
Hi,
i am calling the .TIF format picture in the swing application and it is not showing any error and not displaying the image i requested.
my code looks like this
JLabel img = new JLabel("", new ImageIcon("index.TIF"), JLabel.CENTER)
but the image is not displayed and i tried with .gif and .jpeg and its working fine.
can somebody help me
thank you
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

The JRE only provides support for GIF, JPEG, and PNG images. For any other image types, you'll have to use JAI (Java Advanced Imaging API) or a third party class for TIFF decoding.


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

Joined: Sep 29, 2003
Posts: 299
I beleive you can only use gif/jpg, or png images. Take a look at the Javadocs for Toolkit.getImage()
Brian


My Java Freeware:<br />MACCC - <a href="http://maccc.pipasoft.com" target="_blank" rel="nofollow">http://maccc.pipasoft.com</a><br />Nator - <a href="http://nator.pipasoft.com" target="_blank" rel="nofollow">http://nator.pipasoft.com</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: calling .TIF image in Swing
 
Similar Threads
How open a .tif format image in the web browser
Inclined Text of JLabel
java.io.RandomAccessFile. (Urgent please)
Swing to Image conversion
Problem regarding logo