Re: [Gimp-developer] copy-paste: position shift with alpha images

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Martin Bernreuther <MartinBern@xxxxxx> writes:

> I just wantet to copy a rectangle area from a source-layer to a target layer
> of an image. That's what I done first:
> 
> (gimp-rect-select image 0 0 layer-width height REPLACE FALSE 0)
> (gimp-edit-copy source-layer)
> (let ((floating-sel (car (gimp-edit-paste target-layer FALSE)))) 
> (gimp-floating-sel-anchor floating-sel))
> 
> This works for a lot of cases BUT if I have an image showing a
> figure on a transparent background (with alpha channel), something
> strange happens: The position of the figure on the target-layer is
> shifted (an the only the figure itself is selected) It only works if
> the bounding box of the visible parts equal the selection.  I got
> the same results using the GUI (also with select-all).

the internal clipboard automatically crops the stored selection.

> How can I avoid this?
> 
> Is there a faster way to transfer the layer contents to another layer,
> avoiding the intermediate step of the buffer?

you could copy the whole layer using (gimp-layer-copy).


Salut, Sven

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux