I got "Out of memory" exception when load an ".ico" file use System.Drawing.Image.FromFile,
Image.FromFile gives "Out of Memory" Exception for iconImage.FromFile(sFilePath, true);
but don't get any exception when load a ".jpg" file, and there are same permission settings for these files. I found a post which said the exception caused by it doesn't have sufficient permission. :(

And I still got "Paramter is not vaild" exception when load the ico use Image.FromStream.
Image.FromFile gives "Out of Memory" Exception for iconFileStream fs = new FileStream(sFilePath, FileMode.Open, FileAccess.Read);
Image.FromFile gives "Out of Memory" Exception for iconImage img 
= Image.FromStream(fs, truetrue);
I'm confused, the codes seem work on another PC. :(

Who knows what am i doing wrong?

相关文章:

  • 2021-08-22
  • 2022-12-23
  • 2021-11-23
  • 2021-06-17
  • 2021-05-27
  • 2021-08-02
  • 2021-12-04
  • 2021-06-30
猜你喜欢
  • 2022-01-07
  • 2021-12-31
  • 2021-09-22
  • 2021-11-29
  • 2021-12-09
  • 2021-05-16
  • 2021-07-23
相关资源
相似解决方案