Bitmap with alpha channel crashes Bitmap () constructor only under Windows 7
-
Ran into a weird Bitmap problem that I can't find in Google: The Bitmap constructor crashes on a file with an alpha channel under Windows 7, but works perfectly under Windows XP. The code couldn't be simpler:
Bitmap image = new Bitmap (fname);
The error is: "Parameter is not valid", and there's no inner exception. If it failed in Windows XP too, I'd suspect a simple bug, but since it works there it implies it's something more complex. Any ideas how a bitmap with an alpha channel can be loaded under Windows 7? Thanks!
"Microsoft -- Adding unnecessary complexity to your work since 1987!"
-
Ran into a weird Bitmap problem that I can't find in Google: The Bitmap constructor crashes on a file with an alpha channel under Windows 7, but works perfectly under Windows XP. The code couldn't be simpler:
Bitmap image = new Bitmap (fname);
The error is: "Parameter is not valid", and there's no inner exception. If it failed in Windows XP too, I'd suspect a simple bug, but since it works there it implies it's something more complex. Any ideas how a bitmap with an alpha channel can be loaded under Windows 7? Thanks!
"Microsoft -- Adding unnecessary complexity to your work since 1987!"
Is it a plain BMP file?
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
-
Is it a plain BMP file?
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
It's a TIFF file. I've loaded BMP files (without an alpha channel) with this same code with no problem.
"Microsoft -- Adding unnecessary complexity to your work since 1987!"
-
It's a TIFF file. I've loaded BMP files (without an alpha channel) with this same code with no problem.
"Microsoft -- Adding unnecessary complexity to your work since 1987!"
And the same file opens on XP?
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
-
And the same file opens on XP?
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
Yes. The TIFF file with an alpha channel works perfectly under XP. Both BMP and TIFF files WITHOUT an alpha channel work under both OSes.
"Microsoft -- Adding unnecessary complexity to your work since 1987!"
-
Yes. The TIFF file with an alpha channel works perfectly under XP. Both BMP and TIFF files WITHOUT an alpha channel work under both OSes.
"Microsoft -- Adding unnecessary complexity to your work since 1987!"
Possibly a problem with the TIFF codec in Windows 7 then I'm afraid. If I were you, I'd raise a report through Microsoft Connect.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
-
Possibly a problem with the TIFF codec in Windows 7 then I'm afraid. If I were you, I'd raise a report through Microsoft Connect.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
Thanks!
"Microsoft -- Adding unnecessary complexity to your work since 1987!"
-
Thanks!
"Microsoft -- Adding unnecessary complexity to your work since 1987!"
You're welcome. I'm just sorry I couldn't be of more assistance.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility