FremyCompany Posted August 8, 2008 Share Posted August 8, 2008 (edited) Moderators Note: Support for 32-Bit (with alpha) Bitmaps has been built into Paint.NET since v4.2. 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 <== 1.xx] : - Application optimised - Fixed a problem of 1px translation on Windows - Support now all bitmaps (and not only 32bpp) Moderators Note: Find the a new version of this plugin here: https://forums.getpaint.net/topic/11201-alpha-32bits-bitmap-support-for-paintnet/?do=findComment&comment=308033 BMP32 Paint.NET FileType.zip SourceCode.zip Edited December 19, 2019 by toe_head2001 Quote Link to comment Share on other sites More sharing options...
Deadl0ck Posted December 3, 2008 Share Posted December 3, 2008 ooh... I've been waiting for this! There is however a bug in the current version... the whole image is shifted 1 pixel to the left in the resulting bitmap... Quote Link to comment Share on other sites More sharing options...
FremyCompany Posted December 6, 2008 Author Share Posted December 6, 2008 Yes, I already have seen this little bug, but this is not a problem in my code but a problem with some mis-encoded bitmaps.... 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). Fremy Quote Link to comment Share on other sites More sharing options...
Deadl0ck Posted December 10, 2008 Share Posted December 10, 2008 Yes I would indeed be interested :-) 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... Quote Link to comment Share on other sites More sharing options...
dcook Posted December 20, 2008 Share Posted December 20, 2008 I made a few fixes and improvements. It doesn't handle all types of BMP files, but this is good enough for my needs. BmpX_Release.zip BmpX_Source.zip Quote Link to comment Share on other sites More sharing options...
pyrochild Posted December 20, 2008 Share Posted December 20, 2008 You should keep all updates in the first post. Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
dev Posted February 2, 2010 Share Posted February 2, 2010 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). [Edit] If anyone is interested, I've made some changes to the source so that the BMP no longer uses compression. This version should play nice with Win32 LoadImage(). BmpX.zip 1 Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted February 3, 2010 Share Posted February 3, 2010 Thanks for the update. Could you change it to a ZIP file? Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
dev Posted February 4, 2010 Share Posted February 4, 2010 Thanks for the update. Could you change it to a ZIP file? Yes, sorry. I found a bug with it, too, so I'm making a couple changes, then I will re-upload in ZIP format. Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted February 4, 2010 Share Posted February 4, 2010 Thanks. We have enough trouble with ZIP files without introducing RAR files too Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
dev Posted February 4, 2010 Share Posted February 4, 2010 Thanks. We have enough trouble with ZIP files without introducing RAR files too , 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. Quote Link to comment Share on other sites More sharing options...
Andrewr05 Posted April 8, 2011 Share Posted April 8, 2011 Anyone have a copy of this plugin? The links are all dead. Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted April 8, 2011 Share Posted April 8, 2011 Some forum attachements have been lost or corrupted in the recent forum outage. If the link cannot be resurected the plugin may have to be uploaded again. Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
Andrewr05 Posted April 8, 2011 Share Posted April 8, 2011 Some forum attachements have been lost or corrupted in the recent forum outage. If the link cannot be resurected the plugin may have to be uploaded again.Thanks for the quick reply, should I PM the OP of the thread and ask him/her to reupload the file? Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted April 8, 2011 Share Posted April 8, 2011 Original poster was last here in May 2008, I suspect that a PM would be a waste of time. Give it a couple of days. If we can't locate the attachment at least we have the source file to try and recreate the plugin. Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
pyrochild Posted April 8, 2011 Share Posted April 8, 2011 I've recompiled it from the source, which is apparently the only working attachment in this thread. Lemme know if it works... Edit: removed, as the attachments above have been restored. Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
Duck Posted April 23, 2011 Share Posted April 23, 2011 (edited) I've recompiled it from the source, which is apparently the only working attachment in this thread. Lemme know if it works... No, it DOES NOT WORK. However, I have used the plugin from #7 successfully to edit a transparent bmp in an exe file, so #7 is good for sure. A mod should edit post #1 to point to post #7. Edited April 23, 2011 by Duck 1 Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted April 23, 2011 Share Posted April 23, 2011 A mod should edit post #1 to point to post #7. If you ask nicely, Pyrochild might do it for you. He was good enough to recompile the original after all. You should not forget the power of politeness. PLEASE and THANK YOU go a long way around here. Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
Duck Posted April 23, 2011 Share Posted April 23, 2011 Yes it was like gone 3am I was tired just trying to post that to save other people a load of hassle trying to get it to work. Quote Link to comment Share on other sites More sharing options...
DavidCarr Posted May 2, 2013 Share Posted May 2, 2013 This plugin is extremely useful for creating alpha-channel bitmaps for Visual Studio 2010 (even if VS2010 can't properly deal with them and renders the transparency as black). 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.". Only post #7 (date 2010.Feb.02) by Dev and its BmpX.zip attachment, holding the 'BMP32 Paint.NET FileType.dll", allows a BMPX to be generated and then work properly in VS2010 (after renaming to .BMP). This probably makes sense from what Dev wrote around the Win32 API call to LoadImage(). So I concur with #18 Duck's assertion on 2011.Apr.20 that only #7 Dev's attachment works. In terms of the value of this thread...thx again...and BUMP! Quote Link to comment Share on other sites More sharing options...
Coornio Posted October 19, 2014 Share Posted October 19, 2014 So is there any chance of this being updated? Ever since v4.0 it simply throws an error and does nothing. Quote Link to comment Share on other sites More sharing options...
midora Posted October 19, 2014 Share Posted October 19, 2014 The plugin available in post 7 works as expected in Paint.NET 4 (load and save). So if you are getting an error you should provide more details. Quote Link to comment Share on other sites More sharing options...
Coornio Posted October 19, 2014 Share Posted October 19, 2014 It would appear that said attachment does indeed work without throwing errors. But at that place it's only natural not to see it It never was moved to the OP afterall. Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted October 19, 2014 Share Posted October 19, 2014 I've added a note linking to the correct post. Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.