Re: Anyway to display tiff image within the browser ?
| From: | Kris Dahl | Date: | Fri, 09 Jun 2000 00:55:28 +0000 |
| Subject: | Re: Anyway to display tiff image within the browser ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-1355@lists.php.net to get a copy of this message | ||
on 6/8/00 3:48 PM, Sunil Jagarlamudi at sunil@tamri.com wrote:
>
> When I view a page where I have a gif file stored in the database I seem
> to have no problem viewing them with some line like
>
> <img src="getdata.php3?id=1">
>
> If the file is a tif I get a broken image. The only way I can view this file
> is by save image as getdata.php3 and then view it with a browser. Is there
> anyway to make a tiff image come within the netscape/explorer ?
Well, in your getdata script you must have set the Mime header to something
like:
header("Content-type: image/gif");
Right?
According to my trusty list of Mime Types, the one for tiff is supposed to
be
image/tiff
so put something like
header("Content-type: image/tiff");
in your getdata.php3 file when it serves up tiffs.
These commands essentially let the web browser know what kind of file is
coming down the pipe, so it can launch the appropriate application/plugin
for the file.
-k