When saving a PNG file with the bit depth set to auto detect, it sometimes incorrectly guesses 8 bit instead of 24 or 32, which somehow creates an image which looks fine in windows photo viewer and PDN itself and on thumbnails, but in other programs (or PNG file reader APIs) it messes up wildly and cannot be colorized in some situations. Here are 2 screenshots from Minecraft, one with the issue (taken a while ago) and one which I took today after realizing what had happened and saving in 32 bit depth.
More info:
Windows 7 SP1 64Bit
Paint.NET 4.0.3
.NET Framework 4.5.1