Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# bitmap to array byte

public static class ImageExtensions
{
    public static byte[] ToByteArray(this Image image, ImageFormat format)
    {
        using(MemoryStream ms = new MemoryStream())
        {
            image.Save(ms, format);
            return ms.ToArray();
        }
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #bitmap #array #byte
ADD COMMENT
Topic
Name
4+8 =