Add a utility function to wrap PDB compat nodes in gimp:cast-format
ops, so we can use ops that are now implemented in linear RGB for
plug-in compat procedures, which are all supposed to work on gamma
corrected RGB.
save_image(): remove bogus "- 1" from the calculation of the height of
the row of tiles to save. Fixes garbage saved to the last line of all
PIX files.
save_image(): use the chosen export format's bpp, not the drawable's.
Fixed exporting of > 8 bit images.
Also make the plug-in export indexed images directly (without
requiring export conversion).
If the passed dialog is a GimpColorProfileChooserDialog, handle its
"response" signal automatically and also destroy it when the combo box
is destroyed (before we leaked all dialogs). Remove the same callback
from all places using GimpColorProfileComboBox.
and improve gimp_color_profile_combo_box_set_active() to get the
profile's label from the ICC file if no label was provided. Simplifies
all its callers and removes code duplication.
Instead of adding multiple #else ... #endif branches for missing lcms
types, do the fallback at the end if no lcms type could be determined
for the layer's pixel format.
- fall back to float for missing half float
- implement double and fallback to RGBA float for missing RGBA double
- fall back to float for everything else potentially missing
which returns a string meant to label the profile in the GUI, it's
either the profile's description, its model, or "(unnamed profile)" as
a fallback. Use the function instead of duplicating that logic
inconsistently and imcompletely all over the place.
- verify that GimpColorConfig.rgb_profile actually is an RGB profile.
- on failure, don't assoociate the rgb_profile filename with the
built-in sRGB profile.
and remove the RGB check from all callers of lcms_image_get_profile(),
the function now returns an RGB profile or NULL. This implicitly stop
checking that 'icc-profile' actually contains an RGB profile.
Add functions to get a profile's description, manufacturer, model and
copyright, and use them instead of implementing the same 10 times.
Also add a GimpColorProfile typedef which avoids both having to
include lcms globally or using a gpointer instead (which looks bad and
non-descriptive in an API).
Don't check for it as if it were optional, and error out further down
in configure.ac. Instead error out immediately and remove all other
checks and Makefile hacks.
Some libpng errors can safely be marked as nonfatal, which is much
better than simply failing in those cases.
Thanks to John Bowler for pointing out this solution.
The number of colors in an image shouldn't be higher than the number of
colormap entries. Additionally, consolidate post error cleanup in
load_image().