After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 342355 - Full support for 16/32bits bitmaps (*.bmp) and support for Alpha channel
Full support for 16/32bits bitmaps (*.bmp) and support for Alpha channel
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
git master
Other All
: Normal enhancement
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2006-05-19 14:53 UTC by Piotr FILICIAK
Modified: 2006-08-15 17:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
bmp-plugin patch (for full support 16/32bits bitmaps and alpha channel (29.74 KB, patch)
2006-05-19 14:55 UTC, Piotr FILICIAK
needs-work Details | Review
current CVS patch (28.97 KB, patch)
2006-06-29 17:19 UTC, Piotr FILICIAK
committed Details | Review
patched files (12.87 KB, application/x-tgz)
2006-06-29 17:22 UTC, Piotr FILICIAK
  Details
test bitmaps (79.38 KB, application/x-tgz)
2006-06-29 17:26 UTC, Piotr FILICIAK
  Details
patch for current CVS (14.41 KB, patch)
2006-07-20 20:44 UTC, Piotr FILICIAK
committed Details | Review

Description Piotr FILICIAK 2006-05-19 14:53:49 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.
Comment 1 Piotr FILICIAK 2006-05-19 14:55:59 UTC
Created attachment 65842 [details] [review]
bmp-plugin patch (for full support 16/32bits bitmaps and alpha channel
Comment 2 Sven Neumann 2006-05-22 09:22:58 UTC
Nice. Can someone please give this patch some testing so that we can decide if it can still be incorporated for GIMP 2.4?
Comment 3 Sven Neumann 2006-06-27 18:40:16 UTC
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?
Comment 4 Piotr FILICIAK 2006-06-29 17:18:55 UTC
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
Comment 5 Piotr FILICIAK 2006-06-29 17:19:57 UTC
Created attachment 68177 [details] [review]
current CVS patch
Comment 6 Piotr FILICIAK 2006-06-29 17:22:21 UTC
Created attachment 68179 [details]
patched files
Comment 7 Piotr FILICIAK 2006-06-29 17:26:19 UTC
Created attachment 68180 [details]
test bitmaps
Comment 8 Raphaël Quinet 2006-06-29 20:42:40 UTC
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.
Comment 9 weskaggs 2006-07-03 19:20:56 UTC
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?
Comment 10 Sven Neumann 2006-07-05 19:58:26 UTC
Let's get this patch into CVS, then look at improving the Save dialog.
Comment 11 Sven Neumann 2006-07-12 14:25:53 UTC
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...
Comment 12 Sven Neumann 2006-07-18 09:18:45 UTC
Piotr, I was hoping to get some comments from you on this. Are we alone now with your patch in CVS?
Comment 13 Piotr FILICIAK 2006-07-18 16:38:31 UTC
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...
Comment 14 Piotr FILICIAK 2006-07-20 20:44:10 UTC
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
Comment 15 Sven Neumann 2006-08-15 17:34:40 UTC
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.