TIFF bitmap with alpha channel crashes Bitmap () constructor only under Windows 7, 64-bit


  • 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:    (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!

    (Originally posted at another forum, but it was suggested that I move the post here.)
    9 เมษายน 2555 15:28


  • 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 , and is compatible with .NET.

    • ทำเครื่องหมายเป็นคำตอบโดย alankdkd 9 เมษายน 2555 20:58
    9 เมษายน 2555 20:58