this two code snippets should return the same line for the same image file
No, they really shouldn't.
# base64 JPEG , , 0s , GetBuffer ToArray. ( ToArray .)
Java SampleModel. , , , #.
, , - .
, " base64", Image. , # :
string base64 = Convert.ToBase64String(File.ReadAllBytes(filename));
, , - , base64, .