Meyka Jograt Meyka Jograt - 1 year ago 71 Question

Save Blob Image with Width & Height VB.Net, MySQL

How can I save image with

Width & Height (360x480)

So far this code helps me to convert the image in the
to save it in database.

Dim ms As New MemoryStream()
picImage.Image.Save(ms, ImageFormat.Png)
Dim pic_arr As Byte() = New Byte(ms.Length - 1) {}
ms.Position = 0
ms.Read(pic_arr, 0, pic_arr.Length)

How can I ADD the feature where I can set the Image Width & Height?

Answer Source

The Image object has Height and Width properties. Those are just numbers so you would save them to the database just like you would any other numbers.