Image Problems

Results 1 to 2 of 2

Thread: Image Problems

  1. #1
    Join Date
    Dec 1969

    Default Image Problems

    Is there any way of returning an image dynamically from a script to a html page?<BR><BR>i.e. in the html page &#060;img src="aspscript.aspx"&#062;<BR><BR>Then the script or c# code, creates the image dynamically and returns it to be displayed in the html page.<BR><BR>Any ideas? How do i return the image object, and if it is possible, would I be able to pass parameters to the script in this way?<BR><BR>Any thoughts to point me in the right direction are greatly appreciated.

  2. #2
    Join Date
    Dec 1969

    Default RE: Image Problems

    This code on aspscript.aspx should do it:<BR><BR>//Get your image from wherever<BR>Image img;<BR>//Set the binary stream to the correct output type<BR>Response.ContentType = "image/jpeg";<BR>//Write the image to the binary stream<BR>img.Save(Response.OutputStream, ImageFormat.Jpeg);

Posting Permissions

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