How do I bind a Byte array to an Image in WPF with a value converter?

后端 未结 5 1341
逝去的感伤
逝去的感伤 2020-12-03 05:59

I\'m trying to bind a Byte array from my databse to a WPF Image.

My XAML:


    

        
5条回答
  •  没有蜡笔的小新
    2020-12-03 06:09

    My guess would be that the bytes are not a legitimate image format. I believe that error code corresponds to WINCODEC_ERR_COMPONENTNOTFOUND, which would be consistent with invalid bytes.

    What format is the byte array supposed to be in? Can you save it to disk, and try to open it with another imaging program?

提交回复
热议问题