By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,743 Members | 1,780 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,743 IT Pros & Developers. It's quick & easy.

script-generated images and internet explorer

P: n/a
Hi all,

I wrote a small script that is supposed to get an image from a database and
return it to the user. The relevant part looks like this:

<?php
[...]
header('Content-type: image/jpeg');
header('Content-Disposition: inline; filename=".$image_name".);

print $image;
?>

This works fine in mozilla (and I guess netscape as well), but IE displays
the image as bitmap, regardless which instructions I send out to it. It
actually seems to decompress the jpeg back to bitmap before displaying,
because even if I try to save the file as jpeg it writes it in bitmap. I
though that these headers were pretty standard, and I am really puzzled as
to why IE doesn't take them into consideration.

Is there any way around this problem? T.I.A.

B.
Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
*** Bruno Carneiro da Cunha wrote/escribió (Sun, 02 Nov 2003 19:11:11 GMT):
This works fine in mozilla (and I guess netscape as well), but IE displays
the image as bitmap, regardless which instructions I send out to it. It
actually seems to decompress the jpeg back to bitmap before displaying,
because even if I try to save the file as jpeg it writes it in bitmap.


I guess it's a completely different problem. Delete Temporary Internet
Files and try again.
--
--
-- Álvaro G. Vicario - Burgos, Spain
--
Jul 17 '05 #2

P: n/a
Bruno Carneiro da Cunha wrote:
Hi all,

I wrote a small script that is supposed to get an image from a database and
return it to the user. The relevant part looks like this:

<?php
[...]
header('Content-type: image/jpeg');
header('Content-Disposition: inline; filename=".$image_name".);

print $image;
?>

This works fine in mozilla (and I guess netscape as well), but IE displays
the image as bitmap, regardless which instructions I send out to it. It
actually seems to decompress the jpeg back to bitmap before displaying,
because even if I try to save the file as jpeg it writes it in bitmap. I
though that these headers were pretty standard, and I am really puzzled as
to why IE doesn't take them into consideration.

Is there any way around this problem? T.I.A.

IE is very funny about things like this. It seems to selectively ignore
mime types in favour of file extensions.

Try linking to your image script as follows:
<img src="yourscript.php/image.jpg">
which sometimes helps to confuse IE into doing things properly.

Jul 17 '05 #3

P: n/a
Kevin Thorpe wrote:
IE is very funny about things like this. It seems to selectively ignore
mime types in favour of file extensions.


Indeed IE is broken. For anyone masochistic enough to wade through
it, Wacky Will's even written up its misbehaviour. The de rigueur
microfonts and technobabble come as standard, of course.

http://msdn.microsoft.com/workshop/n...appendix_a.asp

--
Jock
Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.