check that the merged layer has image width and height and resize it if

2003-05-26  Sven Neumann  <sven@gimp.org>

	* libgimp/gimpexport.c (export_merge): check that the merged layer
	has image width and height and resize it if necessary. Fixes bug
	#113639.
This commit is contained in:
Sven Neumann 2003-05-26 17:30:15 +00:00 committed by Sven Neumann
parent 707e597665
commit 5ac6c41add
2 changed files with 21 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2003-05-26 Sven Neumann <sven@gimp.org>
* 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 <mitch@gimp.org>
* app/base/tile-manager-private.h: added "gint ref_count" to the

View File

@ -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++)
{