Vb.net - Image(Of Rgba32) not working #2626
Replies: 3 comments 3 replies
-
The - Dim image As Image(Of Rgba32) = image.Load(Of Rgba32)(imageStream)
+ Dim image As Image(Of Rgba32) = Image.Load(Of Rgba32)(imageStream) note the capital big caveat here is that I'm not a VB developer and kind of just guessing as you failed to actually provide any real detail on the error your actually seeing. PS. You really need to make sure you do a few things things when seeking help on an open source projects repo, you should provide all the error information you are seeing, just saying 'doesn't seem valid' isn't anywhere near as helpful as trying to compile and then reporting that the compiler return 'XXX' error message on line Y... also when providing code samples please to to make sure they are formatted correctly, preferable with colorized style applied. If you don't know how to do that you want to read the markdown docs linked below every comment box on github. |
Beta Was this translation helpful? Give feedback.
-
It works like this:
What is the problem with the "(of Rgba32)"?? |
Beta Was this translation helpful? Give feedback.
-
I assume you're running into something related to this: dotnet/vblang#297 Basically, VB.NET is not compatible with some of the types being used in ImageSharp. This is just a guess, though, as I rarely code in VB. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I would like to know how to solve this example.
Dim image As Image(Of Rgba32) , does not seem valid in Visual Studio - Visual Basic
Dim base64ImageData As String = "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAWElEQVR42mP8z8AAROP8TT10JAAAAAElFTkSuQmCC" base64ImageData = base64ImageData.Replace(" ", "").Replace(vbCrLf, "").Replace(vbLf, "").Replace(vbCr, "") Dim imageBytes As Byte() = Convert.FromBase64String(base64ImageData) Using imageStream As New MemoryStream(imageBytes) Dim image As Image(Of Rgba32) = image.Load(Of Rgba32)(imageStream) End Using
Beta Was this translation helpful? Give feedback.
All reactions