Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to display a TIF image 1

Status
Not open for further replies.

dave755

IS-IT--Management
May 3, 2001
69
0
0
US
I need to be able to display a TIF image on a page. I have tried two methods:

Code:
<IMG src="<%=sThisTif%>">
This method shows the red X in a square where the image should go.

Code:
  <FRAME src="<%=sThisTif%>" name="TIF">
This method seems to be sensitive to the file associations present on a particular computer. I have tried it on four workstations with four very different results (only one of which was to actually display the TIF in the browser window).

Dave Gee
 
I had a gig once to show TIFFs of land records and such from the County Clerk's office.

Back then there was zero support in the browser so it was either force the user to download a viewer or convert the images. Since disk space was cheap, and not too many people had broadband back in 2000, I set up a script to convert them.
 
I am open to a conversion script. How did it work?

FYI: I have 10's of thousands of these images to deal with and another ~10k images arrive every two weeks.

Dave Gee
 
If you don't mind converting on the computer, rather than on the fly, Irfanview is free graphics software that can do batch file conversions, and I've been using it successfully for several years for that, as well as minor graphic editting. It loads quickly and does a decent job, once you get used to what it can handle and how to do it.

Lee
 
I also has thousands of these things so I didn't convert them all as they came in.

It was almost 5 years ago so my recollection is a little fuzzy but I think this one I did with a custom 404 page.

There was one folder for BMPs and another for TIFFs.

All of the links for any image went to the BMP folder. Same file name but with BMP extension instead of TIFF.

Now the BMP folder started out empty, so any of these links would have causes a 404 error.

But IIS lets you replace the standard 404 error page!

So I made a little script that would fetch the requested file out of the TIFF folder and convert it to a BMP using a little freeware TIFF -> BMP DLL that I downloaded off the net.

I made a little script to purge the BMPs thinking that over time, the BMP folder would fill up but then the pointy hair boss got a better idea and bought a multi-terrabyte drive array. That would be pretty expensive even today so I don't want to guess what it cost back then. Oh well, it was venture capital money.

I also remember there was something funky I had to do about the fact that TIFFs can hold multiple pages but I was only doing 1 page per BMP. I don't remember exactly what I did.
 
Oh, and the reason for BMPs was that they were lossless.

This was required because they were scanned documents and they looked really fuzzy as jpegs or gifs.

If your images are not documents then you can use one of the other formats and save a lot of diskspace.
 
Hmm, think I would just:
convert /inputdir/*.tiff /outputdir/*.jpg

and batch em all at once :D

Course that isn't going to help people who only have windows boxes handy :p

-T

barcode_1.gif
 
It appears that converting the TIF's to JPG's is the path of least resistance. I ended up using Irfanview (quite a nice bit of freeware, btw). It took several hours to convert them all, but I just let the program run overnight. No muss, no fuss.

I have to semi-manually process each batch as they come in, anyway. So, adding another step is no big deal.

Thanks, all, for the tips.

Dave Gee
 
Another option for your users to be able to view TIF images on the fly without any conversion or plug-ins loaded is AquaForest TIFF server from
I also work in the Title Industry, so many of our users need to be able to view TIF images. I have been using the AquaForest TIF server for about 8 months now, and really like it. It's a bit pricey, but well worth it in the long run and from an administrative standpoint.

Sean
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top