Image to large to display

Last post 04-22-2009 3:24 PM by nkdpagan. 3 replies.

Sort Posts:

  • Image to large to display

    04-17-2009, 2:16 PM
    • Member
      point Member
    • nkdpagan
    • Member since 04-17-2009, 1:51 PM
    • Posts 5

    Our project uses a dynamically created image file to display on IE 6 in jpeg format.It takes and Image class and saves it to a memorystream object. When the images reaches about 16500 pixels  in width, it will no longer display in the browser. It will still download on the client and can be saved on the desktop,but is not visible.The Image is displayed in tags on a .aspx page that is nested in a master page.  This behavior exhibits in both IE 6 and 7.

    I can copy the image from the browser, and save it to the desktop. I can also open it in a browser using HTML tags, but it seems to get upset when I incorporate the asp components

    So because I can get to the image on my client, Im ruling out server side issues such as IIS or .Net restrictions. Because I can open it with just html tags, I'm going to rule out browers options. This leaves the asp components on the web page. A similar issue is found here, but no resolution:
    http://social.msdn.microsoft.com/forums/en-US/iewebdevelopment/thread/16e6a84c-dd73-4ca1-9a57-fe4f44582d69/

    So Im looking for some guidence. Is there a limit as to the size of an image that can be display? Is there an IE option that needs to be turned on? or off? Is it a hardware issue? Is there a patch or update? Is this simply behavior by design and something we have to live with?
     

     

  • Re: Image to large to display

    04-17-2009, 3:23 PM
    • All-Star
      21,648 point All-Star
    • gunteman
    • Member since 07-11-2007, 12:57 PM
    • Norrköping, Sweden
    • Posts 3,177

    nkdpagan:
    Im ruling out server side issues such as IIS or .Net restrictions. Because I can open it with just html tags, I'm going to rule out browers options. This leaves the asp components on the web page.
     

    But there's no such thing as asp components on the page. Everything is just HTML in the end. Maybe you could show some code?

    Also, is there a good reason to show that large image? Download, of course, but display? 

    -- "Mark As Answer" if my reply helped you --
  • Re: Image to large to display

    04-20-2009, 12:01 PM
    • Member
      point Member
    • nkdpagan
    • Member since 04-17-2009, 1:51 PM
    • Posts 5

    The Client wants to see their org charts on the web brower. It has an underlaying image map that will allow the user to drill down to a more isolated view of some part of the organization. Some of the charts got so dense, the information wasnt readable unless they were enlarged, sometimes by a factor of 2-2.5. Its with these large versions things get wacky.

    The image is generated serverside, then passed to a Cache object to be accessed by the code behind on the page that displays it.This page is placed in content tags of a master page. When I remove all the asp related stuff from the .aspx I can get the image to show (that is, shows in straight html). Otherwise it shows the image without any width. Its still there, I can highlight part of it, and save it to the desk top, but it does not display.

    Here is the code after the image is generated on the server:

    try{

    // Change the response headers to output a JPEG image.

    this.Response.Clear();

    this.Response.ContentType = "image/jpeg";

    System.Drawing.Image OC = null;

    //Build the image

    string imageName = Request.QueryString["ID"];//take the image from Cacheif (Cache[imageName] != null)

    {

    MemoryStream ms = new MemoryStream();

    OC = (System.Drawing.Image)Cache[imageName];//make sure its an image

    OC.Save(ms, ImageFormat.Jpeg);//Save it to the memory stream

    byte[] imgBytes = ms.GetBuffer(); //take memory stream and turn it into byte array

    ms.Close();

    OC.Dispose();

    // Write the image to the response stream in JPEG format.

    Response.OutputStream.Write(imgBytes, 0, imgBytes.Length); //write to the output stream

    Response.Flush();

    Response.End();

    }

    }

  • Re: Image to large to display

    04-22-2009, 3:24 PM
    • Member
      point Member
    • nkdpagan
    • Member since 04-17-2009, 1:51 PM
    • Posts 5

    I did some more research, and think I found where the issue lies.

     Did I mention that our solution used a third party object from ydreams that creates an image map? yup. It appears that this image map is what causes the display to fail when the image reaches a certain size.

    So Im going to hunt them down and see what type of resolution I can come up with. Wish me luck.

Page 1 of 1 (4 items)