Results 1 to 4 of 4

Thread: Bug in GetThumbnailImage method?

  1. #1

    Thread Starter
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704

    Bug in GetThumbnailImage method?

    The image loads halfway or so.... with the last loaded vertical line clipped... (see attached picture)...

    What's the deal with this?


    VB Code:
    1. Dim r As Drawing.Image
    2.         r = Drawing.Image.FromStream(ms)
    3.         Dim dummyCallBack As System.Drawing.Image.GetThumbnailImageAbort
    4.         dummyCallBack = New _
    5.          System.Drawing.Image.GetThumbnailImageAbort(AddressOf DummyImagePointer)
    6.         Dim thumbNailImg As System.Drawing.Image
    7.         Dim g As Drawing.Size
    8.         g = r.PhysicalDimension.ToSize
    9.         Dim c As Double
    10.         c = g.Width / 100
    11.         thumbNailImg = r.GetThumbnailImage(100, Convert.ToInt32(g.Height / c), dummyCallBack, IntPtr.Zero)
    12.  
    13.         f.PictureBox1.Image = thumbNailImg
    14.  
    15. 'this function forces continued execution of the getThumnailImage function
    16. Public Function DummyImagePointer() As Boolean
    17.         Return False
    18. End Function
    Attached Images Attached Images  

  2. #2
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    i think it has something to do with the "return false" callback..try puting "return true" or just use the other overloaded function that doesnt use the callback (i think there's one that doesnt use it right?)
    \m/\m/

  3. #3

    Thread Starter
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    I investigated that possibility... didn't make a difference. You'll probably hate yourself for even replying, because no,its not a bug, and ahem, let's just say it has to do with a certain memoryStream that was obtained from a networkStream that wasn't sending the entire picture over the network... for some reason, my send/receive code breaks (as in fails to due what it should) at around 65k images... something to do with buffersizes...

    But since I was planning on sending the images as thumbnails anyway, I just implemented it on the server side, and well, that'll keep it in check...

    Sorry for wasting your time, lol...

  4. #4
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    something like u said happened to me once but as you didnt say that you got the image over network i didnt say a thing about it
    \m/\m/

Posting Permissions

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



Click Here to Expand Forum to Full Width