GNOME Bugzilla – Bug 342355
Full support for 16/32bits bitmaps (*.bmp) and support for Alpha channel
Last modified: 2006-08-15 17:34:40 UTC
here is the patch: http://lenz.zax.pl/gimp-bmp/bmp-patch.patch and this is example bitmaps (created in Adobe Photoshop 8.0) which are currently readed incorrectly: http://lenz.zax.pl/gimp-bmp/test-bitmaps.tgz after patch you can read 16/24/32bit bitmaps in 565, 5551, 555x, 4444, 444x, 888, 888x, 8888 format with alpha channel, and save as 565, 5551, 555x, 888, 888x, 8888 format.
Created attachment 65842 [details] [review] bmp-plugin patch (for full support 16/32bits bitmaps and alpha channel
Nice. Can someone please give this patch some testing so that we can decide if it can still be incorporated for GIMP 2.4?
I tried to apply this patch but it seems that it has been generated against an older version of the plug-in. In particular it collides in some areas with the patch from bug #306339. Piotr, can you try to update your patch so that it applies cleanly against current CVS or the latest GIMP 2.3 release?
Here is patch (and patched files) for gimp 2.3.10 (current CVS). I added also test bmp files created in Adobe Photoshop 8.0 CS
Created attachment 68177 [details] [review] current CVS patch
Created attachment 68179 [details] patched files
Created attachment 68180 [details] test bitmaps
A couple of lines are longer than 80 characters and should be wrapped. Some other lines could be indented better. But apart from that, the patch looks good. I will let Sven decide when to apply it.
Hmm. It seems to me that the "Save" dialog will look very cryptic and frightening to a lot of users. Would it be possible to set things up so that the most common usage is the default, and the alternatives are hidden in an expander? Or in some other way to make the dialog less terrifying?
Let's get this patch into CVS, then look at improving the Save dialog.
OK, I have gone over the patched files and did some cleanup with regard to coding style and also fixed some glitches in the user interface code. This is now in CVS. 2006-07-12 Sven Neumann <sven@gimp.org> * plug-ins/bmp/bmp.[ch] * plug-ins/bmp/bmpread.c * plug-ins/bmp/bmpwrite.c: applied a slightly modified patch from Piotr Filiciak that adds support for 16/32 bit bitmaps and support for alpha channel (bug #342355). What surprised me is that the Save dialog that is shown for RGB images doesn't have the RLE checkbox. Is that intentional? Otherwise the two dialogs should probably be merged into one. We can hide the controls that only apply to RGB images for other image types. I also get two compiler warnings that should probably be fixed: bmpread.c: In function ‘ReadImage’: bmpread.c:658: warning: value computed is not used bmpread.c:749: warning: value computed is not used Oh, and next time, please try to follow the GIMP coding style...
Piotr, I was hoping to get some comments from you on this. Are we alone now with your patch in CVS?
I just returned from vacation. In this week I will correct plugin as suggested. I will: - merge two save dialogs (8-bit and true color) into one - add advanced tab to save dialog (collapsed by default) - remove compiler warnings - fix GIMP_RUN_WITH_LAST_VALS the patch will be soon...
Created attachment 69279 [details] [review] patch for current CVS - advanced expander - one dialog box for 8-bit and true color images - fixed compiler warnings - fixed GIMP_RUN_WITH_LAST_VALS
I had to do some manual merging to get this patch into CVS because someone had done a code cleanup in the meantime. But I hope I got it all right... 2006-08-15 Sven Neumann <sven@gimp.org> * plug-ins/bmp/bmp.[ch] * plug-ins/bmp/bmpread.c * plug-ins/bmp/bmpwrite.c: applied patch from Piotr Filiciak that merges the save dialogs and completes the changes in bug #342355.