This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes Displaying a tif image 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 » JSP
Bookmark "Displaying a tif image" Watch "Displaying a tif image" New topic

Displaying a tif image

Beth Barja

Joined: Nov 02, 2001
Posts: 10
Hello, I have been working on displaying a tif image from a jsp page. I am running into issues where some people are able to see the image and others are not.
I have a feeling that this is related to what "tif" is associated with on their local machine. I have tried embeding the image in a page, providing a link directly to the image, coping the image locally. I am fresh out of ideas to try.
I saw something about converting tif images to other image formats not too long ago, but I am not sure if that is the best way to go.
I would greatly appreciate any ideas you have to offer.
Thanks -- Beth
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60782

I may be wrong, but I don't think TIF files are natively supported by many browsers out-of-the-box. Perhaps what you are seeing is the difference between browsers that have had plug-ins down-loaded or not.
Just a thought,

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12761
Another possibility is that some browsers may require a content-length in addition to the content type, while others don't need the length.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15958

I had to do something very similar recently, I cheated and converted the TIF to a PDF. Almost EVERYBODY can handle that!
My experience with PDF's BTW, is that static PDF's server up fine, but dynamic ones give Netscape 4 indigestion unless you provide the content-length.

Customer surveys are for companies who didn't pay proper attention to begin with.
Beth Barja

Joined: Nov 02, 2001
Posts: 10
Thank you, all of the answers were helpful in the process of deciding how I want to make this work.
Out of curiosity what did you use to convert TIF to PDF?
Thanks -- Beth
Joe Pardi
Ranch Hand

Joined: Oct 03, 2001
Posts: 47
TIF is only natively supported by IE on Windows 2000. For all other browsers/operating systems, you need a TIF plug-in or convert it to PDF.
As for a free plug-in, take a look at AlternaTIF,
Good luck ...
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15958

There are a number of TIF-to-PDF solutions. I think the Acrobat distiller can do it, but if not, there are commercial products that can.
I couldn't make the cost/convenience tradeoff, so I just loaded the TIF into "the Gimp" image maipulation program and did a "print to PostScript File", then used the ps2pdf utility (under Linux) to convert.
It is sorta covered in the JavaRanch Style Guide.
subject: Displaying a tif image
Similar Threads
Need help to access images with app running on Weblogic 10
Problem Opening File with .TIF Extension
calling .TIF image in Swing
Displaying thumb nail image
image in JSP page