lundi 9 avril 2012 15:28
Windows 7, 64-bit can't handle TIFF files with an alpha channel. Windows XP, 32-bit can.
We can see instances of this problem in various ways:
1. In C#, the Bitmap constructor crashes on a TIFF file with an alpha channel under Windows 7 64-bit, but works perfectly under Windows XP 32-bit.
The code couldn't be simpler:
Bitmap image = new Bitmap (fname);
The error is: "Parameter is not valid", and there's no inner exception.
2. Double-click a TIFF file with an alpha channel. Under Windows XP, 32-bit, the Windows Picture and Fax Viewer will show a full-color image. Under Windows 7, 64-bit, it will show a featureless nearly-blank image.
More information and a simple downloadable C# project that demonstrates the error can be found here: https://connect.microsoft.com/VisualStudio/feedback/details/733950/tiff-bitmap-with-alpha-channel-crashes-bitmap-constructor-only-under-windows-7-64-bit#details (A TIFF file with an alpha channel (white.tif) is also included with the project.)
Any ideas how a TIFF bitmap with an alpha channel can be loaded under Windows 7? Thanks!
Toutes les réponses
lundi 9 avril 2012 20:58
SOLVED: The .NET Bitmap class seems to fail reading a CMYK TIFF file with an alpha channel under Windows 7, 64-bit. The workaround is to use an Aurigma Bitmap, which (unlike a .NET Bitmap) can handle CMYK images with or without an alpha channel.
The Aurigma Bitmap is available from www.aurigma.com , and is compatible with .NET.
- Marqué comme réponse alankdkd lundi 9 avril 2012 20:58