C# Examples

Best site for developers

  • Home
  • About C#
    • C# Interview Questions and Answers
    • Learn C#
  • ALL POSTS
  • Bootstrap Examples
  • CONTACT

Tag Archives: convert image

02 Eyl

Convert Image To Byte Array in C#

This example shows how to convert an image into a byte array.

Sample Code:

        public byte[] ImageToByteArray(Image img)
        {
            MemoryStream ms = new MemoryStream();
            img.Save(ms, System.Drawing.Imaging.ImageFormat.Gif);
            return ms.ToArray();
        }

See Also:
Convert Byte Array To Image

turgay Posted in C# .NET, Winform Controls C#, convert image, convert image to byte array, image to byte array 1 Comment

Post navigation

Kategoriler

Son Yazılar

  • C# Binary Search Tree Implementation
  • Select,Insert,Update,Delete Data in Access File using C#
  • C# Collections Tutorial
  • C# ArrayList Example
  • C# Stack Example
E-Katip.Net - https://e-katip.net
↑