vendredi 15 février 2019

Generate A Blank Image From Width And Height In VB.NET

I want to make a blank canvas bitmap image with a certain width and height, in VB.NET, I am using Visual Studio 2017, with a Windows Forms Application, and .NET Framework 4.6.1.

I tried creating a new bitmap image based of a new image with parameters of the width and height, but that didn't really work out. I tried to have a look and the expected parameters, but it didn't really show me much.

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  Dim Image = New Bitmap(New Image(WidthInput.Value, HeightInput.Value))
End Sub

I expect the result to be an image with a width of WidthInput.Value and a height of HeightInput.Value, that is pure white, or any other colour.




Aucun commentaire:

Enregistrer un commentaire