I am trying to read an image file to a stream. But there is a difference in length for stream when I run the program on Windows XP and Windows 7 (same image file on both system). Here is my code:
private void ImageToStream(Stream stream, string imgPath)
{
System.Drawing.Image img = null;
img = System.Drawing.Image.FromFile(imgPath, true);
img.Save(stream, img.RawFormat);
}
Of course, I am using the same image for testing on both system.
The file system is NTFS. While I'm posting this photo to website, it's working fine for Windows 7 and wrong for Windows XP. I wonder there is a difference while reading an image from a stream in Windows 7 and Windows XP?
Thank in advance!