Skip to content

PictureBox and byte array image issue. #571

Description

@itg-assistant

Ser Gar asked 2017-01-25 19:34:14 UTC

Hi!
Sometimes in firefox i can't view dynamic image in picturebox even refresing a page (biytearray.lenght>0).
Fails more in mobile devices!
Works better in internet explorer.

Even i tried to open directly url link (blank page/image) and after a few tries, it finally shows the image:
background-image: url("component.wx?sid=b16de222-97fe-4cfc-a4ae-737a5753c047&x=eyJpZCI6MjUsInZlcnNpb24iOiI1NTU5NjMiLCJkaXNwb3NlIjpmYWxzZSwibmFtZSI6IkltYWdlIn0=")

My code is like:

if (_imageByteArray != null && _imageByteArray.Length > 0)
{
Text = _imageByteArray.Length.ToString();
var imageStream = new MemoryStream(_imageByteArray);
var image = Image.FromStream(imageStream);
picPhoto.Image = image;
}
else
{
picPhoto.Image = null;
Text = "null image";
}

Even if I load another byteArrayImage ... lenght > 0...
Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething is broken or behaving unexpectedly.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions