c# image to byte array
public byte[] ImageToByteArray(System.Drawing.Image imageIn)
{
using (var ms = new MemoryStream())
{
imageIn.Save(ms,imageIn.RawFormat);
return ms.ToArray();
}
}
Also in C#:
- how to turn a string in a char list c#
- convert int to double c#
- button commandfield commandargument pass textbox
- open file in explorer c#
- parsing string to int c#
- c# messagebox result
- out parameters c#
- unity random float
- grab reference from method parameter c#
- c# bitmap to Image
- c# input
- c# substring reverse
- how to randomly rotate rigidbody of object in unity
- c# empty IEnumerable
- unity to integer
- rotatearound unity
- how to reference scripts in other scenes unity
- reload scene unity
- unity prevent system from creation
- loops in coding
- error CS0542
- c# new thread
- c# loop through object
- singleton design pattern c# volatile