mainrotor
asked on
I need help embedding Base64 Images using VB.Net - When image is a .jpg
Hi Experts,
Can I embed a .jpg image in using Base64 in my vb.net application. I have no problem when the image is a .png, but .jpg's don't show up.
Here is the code I am using in my vb.net app:
Works great when the code I enter in TextBox1.text is something like <img src=""data:image/png;base6 4, ...
but when it's a .jpg file it doesn't work.
I even tried changing the code in TextBox1.Text to something like <img src=""data:image/jpg;base6 4, ...
But it doesn't work.
Do I have to convert my .jpg images to .png?
If so, how?
thanks in advance,
mrotor
Can I embed a .jpg image in using Base64 in my vb.net application. I have no problem when the image is a .png, but .jpg's don't show up.
Here is the code I am using in my vb.net app:
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim TEST1 As String
TEST1 = TextBox1.Text
WebBrowser1.DocumentText = TEST1
End Sub
Works great when the code I enter in TextBox1.text is something like <img src=""data:image/png;base6
but when it's a .jpg file it doesn't work.
I even tried changing the code in TextBox1.Text to something like <img src=""data:image/jpg;base6
But it doesn't work.
Do I have to convert my .jpg images to .png?
If so, how?
thanks in advance,
mrotor
Sure that your ".jpeg" is base64 encoded?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.