Asbjørn

If I set the Icon property to a Vista icon, I get a FileFormatException stating that the image format is unrecognized. If I try the same thing with an old Windows XP icon (without PNG compressed images) it works correctly. I simply cannot believe that WPF doesn't support Vista icons.

Asbjorn



Re: Windows Presentation Foundation (WPF) Setting Window.Icon to Vista 256x256 PNG icon causes a FileFormatException

Chimme

Can vista use pure png-images as icons !

Finaly!

I've always wondered why windows has been stuck to those lame ico-files to which it's almost impossible to find a good converter for.





Re: Windows Presentation Foundation (WPF) Setting Window.Icon to Vista 256x256 PNG icon causes a FileFormatException

Asbjorn

Well, Vista still uses .ico files, but now has the ability to have icons up to 256X256 pixels. To save hard disk space, these large bitmaps are compressed with png in the .ico file.

Asbjorn





Re: Windows Presentation Foundation (WPF) Setting Window.Icon to Vista 256x256 PNG icon causes a FileFormatException

Asbjorn

Any ideas as to why this is happening



Re: Windows Presentation Foundation (WPF) Setting Window.Icon to Vista 256x256 PNG icon causes a FileFormatException

Robert A. Wlodarczyk - MSFT

Can you email me the PNG file



Re: Windows Presentation Foundation (WPF) Setting Window.Icon to Vista 256x256 PNG icon causes a FileFormatException

Asbjorn

I have e-mailed you the file

Asbjorn





Re: Windows Presentation Foundation (WPF) Setting Window.Icon to Vista 256x256 PNG icon causes a FileFormatException

Kent Boogaart

I get an even weirder problem. My icon displays OK the first time, but the second time I try to display it I get the same FileFormatException. I tried removing the 256x256 image from the icon and now it works OK regardless of how many times I display it.





Re: Windows Presentation Foundation (WPF) Setting Window.Icon to Vista 256x256 PNG icon causes a FileFormatException

ejstembler

Any new news on this

I'm using a Vista icon too when I ran into the "The image format is unrecognized" error.

Hopefully they'll fix this with the next release. It would be pretty embarrassing if WPF cannot support Vista icons.





Re: Windows Presentation Foundation (WPF) Setting Window.Icon to Vista 256x256 PNG icon causes a FileFormatException

Joep Beusenberg

When you save the icon file with a 256x256x32 size picture without PNG-compressing the picture, WPF seems to be able to cope with it.


For example in Axialis Icon Studio you can rightclick the icon and disable the PNG-compression. I reckon there are other tools to do the same thing out there somewhere.