Posted on: 2/20/2015 3:32:38 AM | Views : 520

Hello, Im using examples on how to use file upload control, resize images, and then insert them into SQL Server. Anyway, can I legally assign a SqlDbType.VarBinary parameter value to a Bitmap object like I'm doing below?
' Create a new bitmap which will hold the previous resized bitmap Dim newBMP As New Bitmap(originalBMP, newWidth, newHeight) ' Create a graphic based on the new bitmap Dim oGraphics As Graphics = Graphics.FromImage(newBMP) ' Set the properties for the new graphic file oGraphics.SmoothingMode = SmoothingMode.AntiAlias oGraphics.InterpolationMode = InterpolationMode.HighQualityBicubic ' Draw the new graphic based on the resized bitmap oGraphics.DrawImage(originalBMP, 0, 0, newWidth, newHeight) ' Save the new graphic file to the server newBMP.Save(Convert.ToString(directory__1 & Convert.ToString("tn_ ...

Go to the complete details ...