script-generated images and internet explorer

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default script-generated images and internet explorer

    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.


    Bruno Carneiro da Cunha Guest

  2. Similar Questions and Discussions

    1. Internet Explorer Script Error
      Hi - On some (many!) web pages I get "Internet Explorer Script Error" an error has occured in the script..." Then I get: Line: 2 Character: 7...
    2. Contribute 4 & Internet Explorer Script Error
      I have built a website in GoLive on a MAC for a client who is using Contribute 4 on a PC to edit their pages. They are coming up with a script error...
    3. BODY ONLOAD() INTERNET EXPLORER 6.0.2 SCRIPT ERROR
      Hi all, Can you please help me out with this???? i've been using body onload() for ages but since i changed my internet explorer (to 6.02) and OS...
    4. Prove internet package for Microsoft Internet Explorer
      Grow up little nerdy boy. Infecting people's machines is so passé, so why not do something productive like invade North Korea. Tony.
  3. #2

    Default Re: script-generated images and internet explorer

    *** 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
    --
    Alvaro G Vicario Guest

  4. #3

    Default Re: script-generated images and internet explorer

    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.

    Kevin Thorpe Guest

  5. #4

    Default Re: script-generated images and internet explorer

    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.

    [url]http://msdn.microsoft.com/workshop/networking/moniker/overview/appendix_a.asp[/url]

    --
    Jock
    John Dunlop Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139