If you want to edit .MSSTYLES or another DLL or ressources files (to make new skin/style for Windows XP or another application that use 32bpp bitmaps), you will probably see that a great amount of images the windows's skins are using are 32bits-bitmaps. And when you open these bitmaps on almost all applications, the alpha chanel is dropped due to the non-support of this sort of BMP in Windows Bitmap Loading API (for win 3.1 / win 95 historical reasons).
Paint.NET doesn't escape from the rule and load/save bitmaps as they were in 24bpp.
This plugin allow you to open and save file in 32-bit bitmap.
The only thing you must do is to rename it to *.bmpx (to avoid conflit with the existing PDN's BMP handler).
If you try to open non-BMP files, you should receive an error (rem: 24bpp bitmaps are loaded correcty too).
This plugin is perfectible and I'll publish updates if you find bugs/things to change.
Changelog [2.6
The problem is that Windows (XP up to Vista) doesn't support 32bits bitmaps, and they shift properly written bitmapts by 1px. Others applications and OS doesn't (try opening your images with Safari for Windows, you should not see the 1px-shiftage).
In a future version, I could give the possibility to read/write the bitmap in both formats. But because nobody has responded to my message, I've not worked on my plugin anymore because he worked well for my own use. If you are interested, I can publish another version in 1 or 2 weeks (now I've examens at school).
I think the shifting of the bitmap is actually by MS design, not sure why though. I'm using the 32-bit bitmaps for custom theming a Windows application and load the bitmap using standard Windows API calls (Windows XP/Vista DOES support 32-bit bitmaps internally :wink: in fact... the whole theming support is based around the format, explorer doesn't display them correctly though paradoxially enough) anyway... though without the manual shifting before saving in PDN with your plugin it will appear displays shifted 1px.
Actually... I did notice that reopening a manually shifted image using your plugin will open the image unshifted in PDN... so it looks like it is suppose to look... problem is that when making changes and saving again it will be shifted again. So (to me) it appears like it should simply always shift 1px on saving and that's that...
It looks like this uses Bit Field compression which apparently is not understood by the Win32 LoadImage() API function. I created a similar one-pixel 32-bit BMP image in both Gimp and Paint.NET (using this plug-in) and I could load the Gimp image but not the Paint.NET one in my Win32 app. The only difference I could see is the compression method (Gimp doesn't use one).
, I hear ya. ZIP file uploaded. Turns out there weren't any bugs afterall (at least not to MY knowledge). Just some differences in the way transparency is treated (Gimp uses black with an alpha channel of zero, PDN uses white). It did give me the chance to add comments where I made changes to the original code, though.
Just to note that while the 'BMP32 Paint.NET FileType.dll' and 'BmpX.dll' in posts #1 and #5, respectively, both allow Paint.NET V3.5.10 to export a BMPX, neither of these allow the BMPX to be properly displayed in VS2010 (i.e. need to first rename to .BMP). Trying to open the BMP in VS Resource Editor results in a message "Cannot load file. Unknown bitmap format." being displayed twice, followed by an error message once "Unknown bitmap format.".
d3342ee215