Image Type BMP @ "Save Image As" Dialog on IE
| From: | Nitsan Bin-Nun | Date: | Fri, 26 Jun 2009 16:21:02 +0000 |
| Subject: | Image Type BMP @ "Save Image As" Dialog on IE | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-294658@lists.php.net to get a copy of this message | ||
I have wrote a PHP script that serves JPEG images in smaller size, the
resize is done using GD on-the-fly.
I have noticed an interesting issue during the "save image as..." dialog on
serveral internet explorer browsers, somehow, for some strange reason, the
JPEG file is shown as BMP file.
I don't know why this is happening, but I'm trying to make it save it as JPG
file.
In firefox or any other browser everything works like a charm.
I have to mention that the JPG file is located in the HTML in the following
format:
<img src='xxx.jpg' alt='aaa' style='border:0;' />
I have also used mod_rewrite to serve the file with .jpg extension (I
thought that the strange IE may not know how to recognize it..), the PHP
file is sending the correct headers, I'm attaching an example for HTTP
request & response for this resized image:
GET /gallery-image-dolphinim-12450163853. HTTP/1.1
Host: www.dolphinim.net
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10)
Gecko/2009042316 Firefox/3.0.10 FirePHP/0.3
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: PHPSESSID=e4542edfa5bcb7904e351d39c341fffa
HTTP/1.x 200 OK
Date: Fri, 26 Jun 2009 16:18:52 GMT
Server: Apache/1.3.41 (Unix) PHP/5.2.6 mod_log_bytes/1.2 mod_bwlimited/1.4
mod_auth_passthrough/1.8 FrontPage/5.0.2.2635 DAV/1.0.3 mod_ssl/2.8.31
OpenSSL/0.9.8e-fips-rhel5
X-Powered-By: PHP/5.2.6
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Pragma: no-cache
Keep-Alive: timeout=15, max=98
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: image/jpeg
Any directions will be highly appreciated!
Thanks!