sending img with stream object

Posted on 2004-11-29
Last Modified: 2012-08-13

I'm not sure there is a solution for this problem...

when you do something like:

<img src='image.jpg'>

if the image is BIGGER then HEIGHT of your browser windows (in IE that is) IE resize the img to FIT your current IE window.

then, by moving to right down corner or the image, you can press the Orange EXPAND button that will appear in a few sec.

now, this is working with JPG, but NOT with bmp, because bmp is no compressed.

now the question is, when I use object stream in ASP to SEND an image, even if it's a JPG, the damn image arrive FULLSIZE and I CAN'T make it fit automatiquely in IE.  I have to use the
width and height on img propertie.

Question 1.: what can I do to get the normal EXPAND button activated for image sended in stream ??  (I'm not sure it's possible)

Question 2.: I'm asking here because it's concept difficult to explain.  about that ORANGE EXPAND button, on the left upper corner there is a SAVE AS icon displaying at the same time as the orange expand button, CAN I DISABLE that feature ??

wow...  that's it, I hope is *fixable*...

Question by:Genetic_Wolf
    LVL 12

    Accepted Solution

    Response 1:  The image expanding and contracting only works in IE, so best practice is actually to use the height and width attributes of the img tag (or use style tags, but either way works).  On the ASP page that sends the image stream, did you use the ContentType image/jpeg, or something else?

    Response 2:  ASP cannot disable any features of IE without an ActiveX control, which would cause a security prompt to show up and need to be authorized by the user.
    LVL 3

    Author Comment


    AshleyBryant, Thanks.

    response 1:  I *might* have used binary content instead of image/jpeg as sometime I also send .gif or other image type.  and the asp sending the stream is a GENERIC one I use.
    I'll check tonight.  If this will fix the problem, I'll try to modify the asp to be enable to change stream header to make difference between gif, jpg and other.  does it exist a stream for each different type of image ?  must I use: image/gif        image/bmp   etc ??

    response 2:  yeah well.. that's what I thought anyway...

    thanks for your time.

    LVL 12

    Expert Comment

    Yes, you would have to identify what image format was being sent to the browser.  If the stream for the image is something that's being pulled from a database, then you should include the MIME type as another field in the record with your image's binary data.
    LVL 3

    Author Comment


    I'm sorry I was unable to finish testing your proposition.  I should do it tonight, just be patient, I'll be back...
    I'm so overloaded theses day...  I'm printing it right now so I don't forget it and at home tonight I should try it...

    LVL 3

    Author Comment


    I'm sooo sorry, I'm so overloaded...

    your proposed answer did let me on the right track, so you deserve the point. Thanks

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
    This demonstration started out as a follow up to some recently posted questions on the subject of logging in: and…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now