Eeek! Change gimpexport as per my original post to gimp-devel
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2000-04-10 Nick Lamb <njl195@zepler.org.uk>
|
||||||
|
|
||||||
|
* libgimp/gimpexport.c: Eeek! Sven only half implemented my
|
||||||
|
change. Now if the background isn't visible we will suggest
|
||||||
|
"Merge Visible" as expected.
|
||||||
|
|
||||||
2000-04-07 Sven Neumann <sven@gimp.org>
|
2000-04-07 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* libgimp/gimpexport.c: implemented the changes Nick Lamb
|
* libgimp/gimpexport.c: implemented the changes Nick Lamb
|
||||||
|
@ -456,7 +456,7 @@ gimp_export_image (gint32 *image_ID,
|
|||||||
gint32 nlayers;
|
gint32 nlayers;
|
||||||
gint32* layers;
|
gint32* layers;
|
||||||
gboolean added_flatten = FALSE;
|
gboolean added_flatten = FALSE;
|
||||||
gboolean background_has_alpha = FALSE;
|
gboolean background_has_alpha = TRUE;
|
||||||
ExportAction *action;
|
ExportAction *action;
|
||||||
|
|
||||||
g_return_val_if_fail (*image_ID > -1 && *drawable_ID > -1, FALSE);
|
g_return_val_if_fail (*image_ID > -1 && *drawable_ID > -1, FALSE);
|
||||||
@ -473,9 +473,6 @@ gimp_export_image (gint32 *image_ID,
|
|||||||
{
|
{
|
||||||
if (gimp_drawable_has_alpha (layers[i]))
|
if (gimp_drawable_has_alpha (layers[i]))
|
||||||
{
|
{
|
||||||
if (i == nlayers - 1)
|
|
||||||
background_has_alpha = TRUE;
|
|
||||||
|
|
||||||
|
|
||||||
if ( !(capabilities & CAN_HANDLE_ALPHA) )
|
if ( !(capabilities & CAN_HANDLE_ALPHA) )
|
||||||
{
|
{
|
||||||
@ -486,6 +483,11 @@ gimp_export_image (gint32 *image_ID,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
/* If this is the last layer, it's visible and has no alpha
|
||||||
|
channel, then the image has a "flat" background */
|
||||||
|
if (i == nlayers - 1 && gimp_layer_get_visible(layers[i]))
|
||||||
|
background_has_alpha = FALSE;
|
||||||
|
|
||||||
if (capabilities & NEEDS_ALPHA)
|
if (capabilities & NEEDS_ALPHA)
|
||||||
{
|
{
|
||||||
actions = g_slist_prepend (actions, &export_action_add_alpha);
|
actions = g_slist_prepend (actions, &export_action_add_alpha);
|
||||||
|
Reference in New Issue
Block a user