script-generated images and internet explorer

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bruno Carneiro da Cunha

    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=".$ima ge_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.


  • Alvaro G Vicario

    #2
    Re: script-generated images and internet explorer

    *** Bruno Carneiro da Cunha wrote/escribió (Sun, 02 Nov 2003 19:11:11 GMT):[color=blue]
    > 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.[/color]

    I guess it's a completely different problem. Delete Temporary Internet
    Files and try again.


    --
    --
    -- Álvaro G. Vicario - Burgos, Spain
    --

    Comment

    • Kevin Thorpe

      #3
      Re: script-generated images and internet explorer

      Bruno Carneiro da Cunha wrote:[color=blue]
      > 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=".$ima ge_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.
      >[/color]
      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.

      Comment

      • John Dunlop

        #4
        Re: script-generated images and internet explorer

        Kevin Thorpe wrote:
        [color=blue]
        > IE is very funny about things like this. It seems to selectively ignore
        > mime types in favour of file extensions.[/color]

        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.

        Gain technical skills through documentation and training, earn certifications and connect with the community


        --
        Jock

        Comment

        Working...