...

View Full Version : A generic error occurred in GDI+



fazthegreat
01-29-2007, 12:26 AM
Hey Guys,
I'm trying to create a thumnails of images that are strored on the hard disk but I keep on getting this error.

A generic error occurred in GDI+

I'm goin crazy tryin to sort this out, please help!

My code is below:

Dim dummyCallBack as System.Drawing.Image.GetThumbNailImageAbort
dummyCallBack = New System.Drawing.Image.GetThumbnailImageAbort(AddressOf ThumbnailCallback)

Dim fullSizeImg as System.Drawing.Image
fullSizeImg = System.Drawing.Image.FromFile(strSavedPath)

Dim thumbNailImg as System.Drawing.Image
thumbNailImg = fullSizeImg.GetThumbnailImage(100, 100, _
dummyCallBack, IntPtr.Zero)
response.contenttype="image/jpeg"
thumbNailImg.Save(strSavedPath, Imaging.ImageFormat.Jpeg)

fullSizeImg.Dispose()
thumbNailImg.Dispose()



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum