what I havo to do upload and Save image (high resolution) in my database
error in bb = DirectCast(System.Drawing.Image.FromStream(File1.PostedFile.InputStream), System.Drawing.Bitmap)
my code is work with image small resolution
If Not File1.PostedFile.ContentLength > 1000000 Then
Dim imgContentType As String = File1.PostedFile.ContentType
If imgContentType.ToLower().StartsWith("image") Then
Dim bb As System.Drawing.Bitmap
bb = DirectCast(System.Drawing.Image.FromStream(File1.PostedFile.InputStream), System.Drawing.Bitmap)
UpdateImage(BmpToBytes(bb), ID)
End If
Else
End If
mizeyed09
Member
2 Points
10 Posts
upload and Save image (high resolution) in my database
Dec 25, 2011 07:38 AM|LINK
Hi all,
what I havo to do upload and Save image (high resolution) in my database
error in bb = DirectCast(System.Drawing.Image.FromStream(File1.PostedFile.InputStream), System.Drawing.Bitmap)
my code is work with image small resolution
If Not File1.PostedFile.ContentLength > 1000000 Then Dim imgContentType As String = File1.PostedFile.ContentType If imgContentType.ToLower().StartsWith("image") Then Dim bb As System.Drawing.Bitmap bb = DirectCast(System.Drawing.Image.FromStream(File1.PostedFile.InputStream), System.Drawing.Bitmap) UpdateImage(BmpToBytes(bb), ID) End If Else End Ifawanishkumar...
Member
22 Points
15 Posts
Re: upload and Save image (high resolution) in my database
Dec 25, 2011 04:14 PM|LINK
Pls increase the maxrequest length in web.config file
mizeyed09
Member
2 Points
10 Posts
Re: upload and Save image (high resolution) in my database
Dec 26, 2011 04:59 AM|LINK
MR awanishkumar
my code work and upload with low resoluation image but when upload high resolution image with small size it will give me error in this line
bb = DirectCast(System.Drawing.Image.FromStream(File1.PostedFile.InputStream), System.Drawing.Bitmap)
system.outofmemoryexception out of memory. at system.drawing.image.fromstream