Hey folks,
I'm creating an image gallery Custom Web Control. The idea is, that i point
to a folder using the web.config, which makes that folder the 'Image Gallery
Folder'
Each subfolder created, will be an Image Gallery. Now when new images are
uploaded, I want the page to automaticly generate Thumbnails. No problem so
far,
the code I use (see below) first calculates the new with and height
(maintaining the aspect ratio) and then actually resize the image.
Dim bmpThumb As Bitmap
Try
bmpThumb = bmpImage.GetThumbnailImage(_NewWidth, _NewHeight, Nothing,
Nothing)
bmpThumb.Save(_HarddriveFolder & "thumbs\" & Imagename)
Catch ex As Exception
lblErrors.Text &= "Thumbnail failed for '" & Imagename & "' because : "
& ex.Message & "<br>" & vbNewLine
End Try
The code results in a 'A generic error occurred in GDI+' exception on the
..Save line. Is this is permissions problem or something, anybody??