views:

252

answers:

2

I'm having a problem running the following code om Windows 7 x86 when creating an Image from a lzw encoded cmyk + alpha TIFF file.

The FromStream call throws a System.ArgumentException: Parameter is not validRunning When I run the code on Vista or Server 2008 (both x86 and x64 bit) it just works.

using System;
using System.Drawing;
using System.Drawing.Imaging;
.
.
.        
using (FileStream stream = File.OpenRead(fileName))
{
  using (Image image = Image.FromStream(stream, false, false))
  {
    // Do something with the image
  }
}
A: 

If it was working with previous versions of Windows, it might be a bug in Win7... You should probably file a bug at Microsoft Connect

Thomas Levesque
A: 

Hi, Have you found out the root cause of this problem? Please let me know if you have found out the solution. We are also experiencing the same problem when we convert our tiff image into base64 string. It works fine in xp and vista in both 32 and 64 bit machines. But its not working in any windows 7 machine. Please help me.

Thanks and Regards, Dinesh.N

Dinesh