C Sharp And Ms Access Database Tutorial 9 How To Convert Image To Byte Array

C# And Ms Access Database Tutorial #9 – How To Convert Image To Byte Array

VIDEO TUTORIAL

C# And Ms Access Database Tutorial #9 – How To Convert Image To Byte Array

This Tutorial Shows How To Convert Image To Byte Array In C# Windows Forms Application using visual studio 2010.

C# SOURCE CODE

        //Function For Converting Image To Byte Array
        public byte[] convertImageToByteArray(Image imageToConvert) 
        {
            MemoryStream convertImageMemoryStream = new MemoryStream();
            imageToConvert.Save(convertImageMemoryStream, imageToConvert.RawFormat);
            return convertImageMemoryStream.ToArray();
        }

Leave a Reply

Your email address will not be published. Required fields are marked *