diff --git a/ChangeLog b/ChangeLog index 6801fc9cd8..a69a50ae13 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-05-26 Sven Neumann + + * libgimp/gimpexport.c (export_merge): check that the merged layer + has image width and height and resize it if necessary. Fixes bug + #113639. + 2003-05-26 Michael Natterer * app/base/tile-manager-private.h: added "gint ref_count" to the diff --git a/libgimp/gimpexport.c b/libgimp/gimpexport.c index 5c997517a4..bc9e957829 100644 --- a/libgimp/gimpexport.c +++ b/libgimp/gimpexport.c @@ -92,8 +92,21 @@ export_merge (gint32 image_ID, return; /* shouldn't happen */ layers = gimp_image_get_layers (image_ID, &nlayers); - } - + + /* make sure that the merged drawable matches the image size */ + if (gimp_drawable_width (merged) != gimp_image_width (image_ID) || + gimp_drawable_height (merged) != gimp_image_height (image_ID)) + { + gint off_x, off_y; + + gimp_drawable_offsets (merged, &off_x, &off_y); + gimp_layer_resize (merged, + gimp_image_width (image_ID), + gimp_image_height (image_ID), + off_x, off_y); + } + } + /* remove any remaining (invisible) layers */ for (i = 0; i < nlayers; i++) {