Resolution is broken when converting byte to image?

我的未来我决定 提交于 2020-01-17 01:49:17

问题


This is what happens when I load my project file into my software. This happens when I convert the 'byte' parameter into image again.

Here's my conversion method:

public Bitmap ConverToImage(byte[] ImageByteArray)
    {
        using (MemoryStream stream = new MemoryStream(ImageByteArray))
        {
            return (Bitmap)Image.FromStream(stream);
        }
    }

Pushing the byte into an object of the ImageClass

var image = new LayerClass
                        {
                            rect = l.rect,
                            image = img.ConverToImage(l.imageByte),
                            type = (LayerClass.Type)System.Enum.Parse(typeof(LayerClass.Type), "Image"),
                        };

Help.

来源:https://stackoverflow.com/questions/52943319/resolution-is-broken-when-converting-byte-to-image

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!