> Maybe the code for
> http://registry.gimp.org/node/19582
> is useful?
> Nicolas Robidoux

I looked at that one and they simply create a new image with a scaled
version of the active layer, which is sub-optimal from a UI
perspective (the plugin registers under the Image menu, but only
scales one layer, and ends up create a new image).

The "built-in" scaling options are:
 Image->Scale Image which scales all the layers, layer masks, channels
(including the active selection) and paths of the image, not just the
active layer
 Layer->Scale Layer which scales the active layer only but does not
change the image canvas size or scale the associated layer mask (is
that a reasonable behavior?).

Thinking about it, I guess my initial question really had two parts:
>From a UI perspective:
 - should an action like scaling create a new image? (I'm leaning towards no)
 - should an action like scaling scale all layers, masks, channels
and paths of an image if it is the image menu (otherwise in the layer
menu)? (I'm leaning towards yes)
 - should an action like scaling a layer also scale an associated
layer mask? (yes?)
 - with 2.8 having layer groups, will any of this have to change?

>From a programming perspective:
 - Assuming I have decided my plugin will rescale a layer only (i.e.
from the user's perspective the active layer gets scaled) is it better
to create a new drawable to contain the scaled image and insert it in
the layer stack and delete the initial layer, or better to use
gimp_pixel_rgn_init to grab the pixels from the source layer, then
change the layer boundary size and and use gimp_pixel_rgn_init to
create a second pixel region as an output buffer pointing to the newly
sized drawable?

-Rob A>
Gimp-developer mailing list

Reply via email to