• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 232
  • Last Modified:

sending img with stream object


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*...

  • 3
  • 2
1 Solution
Ashley BryantSenior Software EngineerCommented:
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.
Genetic_WolfAuthor Commented:

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.

Ashley BryantSenior Software EngineerCommented:
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.
Genetic_WolfAuthor Commented:

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...

Genetic_WolfAuthor Commented:

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

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

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now