public
static
byte
[] ImageToBinary(
string
imagePath)
{
FileStream fileStream =
new
FileStream(imagePath, FileMode.Open, FileAccess.Read);
byte
[] buffer =
new
byte
[fileStream.Length];
fileStream.Read(buffer, 0, (
int
)fileStream.Length);
fileStream.Close();
return
buffer;
}
Hiç yorum yok:
Yorum Gönder