Commit 5b1f6495 authored by Manish Singh's avatar Manish Singh

better fix for the indexed merge problem

-Yosh
parent 488c4c98
Sun May 17 14:44:32 PDT 1998 Manish Singh <yosh@gimp.org>
* app/gimage.c: fix for merging indexed and indexed-alpha layers
* app/gimage.c: fix for merging indexed and indexed-alpha
layers (from Raph)
Sun May 17 14:02:44 PDT 1998 Manish Singh <yosh@gimp.org>
......
......@@ -1950,7 +1950,7 @@ gimage_merge_layers (GImage *gimage, GSList *merge_list, MergeType merge_type)
undo_push_group_start (gimage, LAYER_MERGE_UNDO);
if (merge_type == FlattenImage ||
!layer_has_alpha (layer))
drawable_type (GIMP_DRAWABLE (layer)) == INDEXED_GIMAGE)
{
switch (gimage_base_type (gimage))
{
......@@ -1958,7 +1958,7 @@ gimage_merge_layers (GImage *gimage, GSList *merge_list, MergeType merge_type)
case GRAY: type = GRAY_GIMAGE; break;
case INDEXED: type = INDEXED_GIMAGE; break;
}
merge_layer = layer_new (gimage->ID, gimage->width, gimage->height,
merge_layer = layer_new (gimage->ID, (x2 - x1), (y2 - y1),
type, drawable_name (GIMP_DRAWABLE(layer)), OPAQUE_OPACITY, NORMAL_MODE);
if (!merge_layer) {
......@@ -1966,6 +1966,9 @@ gimage_merge_layers (GImage *gimage, GSList *merge_list, MergeType merge_type)
return NULL;
}
GIMP_DRAWABLE(merge_layer)->offset_x = x1;
GIMP_DRAWABLE(merge_layer)->offset_y = y1;
/* get the background for compositing */
gimage_get_background (gimage, GIMP_DRAWABLE(merge_layer), bg);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment