Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

bitmap to byte array c#

  public static byte[] ImageToByteArray(Image img)
        {
            using (var stream = new MemoryStream())
            {
                img.Save(stream, System.Drawing.Imaging.ImageFormat.Png);
                return stream.ToArray();
            }
        }
 
PREVIOUS NEXT
Tagged: #bitmap #byte #array
ADD COMMENT
Topic
Name
1+7 =