Can't load image from memoryblock on a webimageview


I have images of fingerprints obtained from a biometrics reader exported as png files. These files are “Encodebased64” and saved as text files in a web server. This is done by an external applicatin, not Xojo related.

I have these files downloaded with HTTPSocket.Get and the content is “Decodebased64”, put into a memoryblock and it is then assigned to a picture.

When I try to assign the resulting picture to Webimageview.Picture property, I get this NilObjectException error.

The image seems normal in the IDE.

While performing some tests, it was possible to save the images in the desktop and open them with any image viewing software.

This is the code on a Custom HTTPSocket PageReceived Event:

[code]Dim c As String
Dim mb As new MemoryBlock(0)

If httpStatus = 200 Then

c = DecodeBase64(content)
mb = c
ppic = Picture.FromData(mb)

RaiseEvent Finished

End If[/code]

And this is what I have in the Finished Event of the instance of the custom class in the window:

pg_Biometrics.ImagemDigital.Picture = me.ppic
catch err As NilObjectException
End Try

ProgressWheel1.Visible = False
btn_Aciona.Enabled = True[/code]

Sample project can be found here:

Is there something wrong in the code?
Any workarounds?
Is this a bug?

Thanks for the support!