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 623290 - Save As... does not save Windows Bitmap as default in dialog
Save As... does not save Windows Bitmap as default in dialog
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: User Interface
2.6.9
Other All
: Normal normal
: 2.6
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2010-07-01 13:33 UTC by bshroyer
Modified: 2010-07-07 18:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed fix (3.11 KB, patch)
2010-07-03 11:34 UTC, Massimo
none Details | Review

Description bshroyer 2010-07-01 13:33:35 UTC
When saving a file as a Windows BMP Image (bmp) using Save As..., the image is saved as a 16-bit color depth image when the default indicates it should be saved as a 32-bit A8R8G8B8

Click Save As... 
Select File_Type of Windows BMP Image (bmp)
Click Save
Click the + for Advanced Options.  A8R8G8B8 is selected.
Click Save.  The image will be saved as a 16-bit color depth image.  Another choice needs to be selected, then come back to A8R8G8B8 to get it to save in that format.

Background:
A PNG file was originally opened.  The only changes were a Bucket Fill Tool and scaling the image from 512x512 to 32x32.
Comment 1 Massimo 2010-07-03 11:34:12 UTC
Created attachment 165174 [details] [review]
Proposed fix

I confirm this bug.

For images with an alpha channel the gui shows
an initial value different from what is actually used 
if the default is accepted.

The problem is that in file 'plug-ins/file-bmp/bmp-write.c',
line 915, 'gtk_toggle_button_set_active' is called 
before the button is connected to the corresponding callback.
This was not a problem when the callback was connected to 
the "pressed" signal, but it is now that it is connected to 
the "clicked" signal (see bug #599233).


The "clicked" signal for a radio_button is called for both the 
widgets toggled, and so, now, during gtk_toggle_button_set_active 
it is called only for the widget becoming inactive, resulting in 
the wrong value being set.

The attached patch:
  1) connects the callback before calling gtk_toggle_button_set_active

  2) in 'format_callback', assign 'BMPSaveData.rgb_format' only if the 
     button is active

  3) connect each radio_button to the signal "toggled".
Comment 2 Sven Neumann 2010-07-07 18:29:05 UTC
Thanks. Fixed in both branches:

commit ca43054f084fa81f5b40f29739cdb9611d012ccb
Author: Massimo Valentini <sixtysix@inwind.it>
Date:   Wed Jul 7 20:29:06 2010 +0200

    Bug 623290 - Save As... does not save Windows Bitmap as default in dialog
    
    Connect to "toggled" signal of radio buttons.