Margin around embedded image

Last post 01-29-2007 2:18 PM by joec0814. 2 replies.

Sort Posts:

  • Margin around embedded image

    01-19-2007, 7:35 PM
    • Loading...
    • bdstark
    • Joined on 01-20-2007, 12:01 AM
    • Posts 1

    I am trying to return an embedded image that is being generated on the fly.  The image generation is working perfectly, and when the page displays, the image displays properly, but there is a margin around the image.  Is there a way around this?  I have the tag

    <

    body style="margin: 0 0 0 0">

    in the the .aspx file, but this doesn't seem to do anything.  The image is the only thing displayed on the page.

     

    Bitmap bmp = KeyframeImage.GetSDKeyframe(sKeyframe, sGuid, Session["Guid"].ToString(), Guid.NewGuid().ToString());

    System.Drawing.Image img = bmp.GetThumbnailImage(iWidth, iHeight, new System.Drawing.Image.GetThumbnailImageAbort(ThumbnailCallback), IntPtr.Zero);

    Response.ContentType =

    "image/jpeg";

    img.Save(Response.OutputStream,

    ImageFormat.Jpeg);

     
    Filed under: , , , ,
  • Re: Margin around embedded image

    01-25-2007, 8:30 PM
    • Loading...
    • qcpbraca
    • Joined on 12-23-2006, 6:56 PM
    • Posts 2

    not sure how you get margin, not sure what exactly your code is doing, but i hope this can help

    when you set body style="margin:0;", extend it to style="margin:0; padding:0; border-style:none;" i actually do it for both html and body tags since opera i think has padding on html tag. if that doesn't help, maybe you have padding on img tags, check them as well by putting some normal picture on your page and see if the same thing happens. if it doesn't help, check your code, maybe you are not filling the whole space, maybe you are leaving that margin.

    unfortunately, i don't know what your code is doing, so i'm not sure can this help but i hope so

     

  • Re: Margin around embedded image

    01-29-2007, 2:18 PM
    • Loading...
    • joec0814
    • Joined on 02-09-2005, 6:39 AM
    • Posts 35

    believe it or not.....it could be white space in your html after the tag - happened to me

    HTH

     joe

Page 1 of 1 (3 items)
Microsoft Communities
Page view counter