Two Laptop Bag
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
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: 63852

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] [About Bear] [Books by Bear]
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13036
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: 17410

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.

An IDE is no substitute for an Intelligent Developer.
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: 17410

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.
I agree. Here's the link:
subject: Displaying a tif image
It's not a secret anymore!