The gif save plugin normally asks the user if it's ok to crop the image if

Tue Jul 18 23:34:34 BST 2000  Austin Donnelly  <austin@gimp.org>

	* plugs-ins/common/gif.c: The gif save plugin normally asks the
	    user if it's ok to crop the image if there are layers larger
    	    than the image size.  This isn't a good idea if we're running
    	    with run_mode == NON_INTERACTIVE.  Fix similar to that
    	    suggested by Bryan Livingston <bryan@cooltext.com> on
    	    gimp-developer mailing list.

   	* app/layer.c: Fix for Bug#17347: Scale Layer leaves artifacts.
	    Basic problem is that scaling a layer when there's a selection
    	    active (eg there's a floating selection) doesn't invalidate
    	    the layer bounds.  Same problem with resizing a layer,
    	    although the bug report didn't mention that.  Fixed by changing
    	    layer_resize() and layer_scale_lowlevel() to call
    	    layer_invalidate_boundary() once done changing the layer.
This commit is contained in:
BST 2000 Austin Donnelly 2000-07-18 22:48:14 +00:00 committed by Austin Donnelly
parent e153e7cd6b
commit 1218b2bb89
5 changed files with 38 additions and 1 deletions

View File

@ -1,3 +1,20 @@
Tue Jul 18 23:34:34 BST 2000 Austin Donnelly <austin@gimp.org>
* plugs-ins/common/gif.c: The gif save plugin normally asks the
user if it's ok to crop the image if there are layers larger
than the image size. This isn't a good idea if we're running
with run_mode == NON_INTERACTIVE. Fix similar to that
suggested by Bryan Livingston <bryan@cooltext.com> on
gimp-developer mailing list.
* app/layer.c: Fix for Bug#17347: Scale Layer leaves artifacts.
Basic problem is that scaling a layer when there's a selection
active (eg there's a floating selection) doesn't invalidate
the layer bounds. Same problem with resizing a layer,
although the bug report didn't mention that. Fixed by changing
layer_resize() and layer_scale_lowlevel() to call
layer_invalidate_boundary() once done changing the layer.
2000-07-18 Tor Lillqvist <tml@iki.fi>
* libgimp/gimp.c (gimp_flush): Add horrible hack that seems to

View File

@ -832,6 +832,9 @@ layer_scale_lowlevel (Layer *layer,
GIMP_DRAWABLE(layer->mask)->offset_y = GIMP_DRAWABLE(layer)->offset_y;
channel_scale (GIMP_CHANNEL(layer->mask), new_width, new_height);
}
/* Make sure we're not caching any old selection info */
layer_invalidate_boundary (layer);
/* Update the new layer position */
@ -1081,6 +1084,9 @@ layer_resize (Layer *layer,
new_width, new_height, offx, offy);
}
/* Make sure we're not caching any old selection info */
layer_invalidate_boundary (layer);
/* update the new layer area */
drawable_update (GIMP_DRAWABLE(layer),
0, 0,

View File

@ -832,6 +832,9 @@ layer_scale_lowlevel (Layer *layer,
GIMP_DRAWABLE(layer->mask)->offset_y = GIMP_DRAWABLE(layer)->offset_y;
channel_scale (GIMP_CHANNEL(layer->mask), new_width, new_height);
}
/* Make sure we're not caching any old selection info */
layer_invalidate_boundary (layer);
/* Update the new layer position */
@ -1081,6 +1084,9 @@ layer_resize (Layer *layer,
new_width, new_height, offx, offy);
}
/* Make sure we're not caching any old selection info */
layer_invalidate_boundary (layer);
/* update the new layer area */
drawable_update (GIMP_DRAWABLE(layer),
0, 0,

View File

@ -832,6 +832,9 @@ layer_scale_lowlevel (Layer *layer,
GIMP_DRAWABLE(layer->mask)->offset_y = GIMP_DRAWABLE(layer)->offset_y;
channel_scale (GIMP_CHANNEL(layer->mask), new_width, new_height);
}
/* Make sure we're not caching any old selection info */
layer_invalidate_boundary (layer);
/* Update the new layer position */
@ -1081,6 +1084,9 @@ layer_resize (Layer *layer,
new_width, new_height, offx, offy);
}
/* Make sure we're not caching any old selection info */
layer_invalidate_boundary (layer);
/* update the new layer area */
drawable_update (GIMP_DRAWABLE(layer),
0, 0,

View File

@ -805,7 +805,9 @@ boundscheck (gint32 image_ID)
/* Image has illegal bounds - ask the user what it wants to do */
if (badbounds_dialog())
/* Do the crop if we can't talk to the user, or if we asked
* the user and they said yes. */
if ((run_mode == RUN_NONINTERACTIVE) || badbounds_dialog ())
{
gimp_run_procedure("gimp_crop", &nreturn_vals,
PARAM_IMAGE, image_ID,