i have a working version of that, integrated with similar script that i found
handy
(not merged, integrated to avoid to crowd up the edit menu, from there the
script will be available.
script included
Copy visible & paste as new layer by Fenceposte
(all visible is pasted, if is a previous selection is saved and restored)
Copy selected visible and paste as new by Fenceposte
(only selected is paste )
copy visible and paste as new image by PhotoComix
Copy visible and set as active brush by Fenceposte
By posting here i fear that may be reformatted you may get from here
is the LAST script (close to the bottom of page) in a comment of "PhotoComiX"
http://www.gimpdome.com/index.php?topic=6544.0
if instead you want only that function "of copy the whole visible as new layer"
you may download from here
http://fence-post.deviantart.com/art/Copy-Visible-and-Paste-Script-72552828
------------------------------
Message: 7
Date: Fri, 14 Mar 2008 17:59:45 +0900
From: "Choi, JiHui"
Subject: Re: [Gimp-user] some function of screenshot seems to work
oppositely
To: gimp-user@lists.xcf.berkeley.edu
Message-ID:
Content-Type: text/plain; charset=UTF-8
oh.. I see.
when I turn off compiz, then gimp screenshot works correctly.
thanks. :)
--
??????????????????????
Choi, JiHui
http://Mr-Dust.pe.kr
http://GIMP.kr
------------------------------
Message: 8
Date: Fri, 14 Mar 2008 18:10:35 +0900
From: "Choi, JiHui"
Subject: [Gimp-user] [fix the script] copy a selection and paste as
new layer..
To: gimp-user@lists.xcf.berkeley.edu
Message-ID:
Content-Type: text/plain; charset=UTF-8
Hi, forks.
Here is a script. this copy a selection of the active layer and paste
it as new layer with its opacity
made by Ankh (thank you, Ankh in #gimp, irc.gimp.org)
but there is a problem.
size of the new layer is not its own size, is the same with the image.
so I tried to fix this script, but I failed. T_T
please, fix it.
and I want one more thing.
I'd like to add a function for pasting a content of clipboard as new layer.
I failed, either -_-
these are very simple function, and I can do using some menus and
keyboard shortcuts.
but sometime I need and repeating 2-3 steps makes me mad.
please help me.
code:
; This program is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 2 of the License, or
; (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with this program; if not, write to the Free Software
; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
;
;
; This script copies the visible layers contained within the active
; image and pastes the results into a single layer at the top of the stack
; of the active image It is an updated version of Karl Ward's merge-copy script
; which can be found here:
http://kward1979uk.deviantart.com/art/Merge-copy-28607825
;
; The Script can be found in the Image's Edit Menu under the name:
"Copy Visible & Paste"
;
; Special thanks to saulgoode at gimptalk.com for his suggestions on
improving the script.
; Define the Function
(define
(copy-paste-new-layer
inImage
inDraw)
; Declare the Variables
(let*
((theHeight (car (gimp-image-height inImage)))
(theWidth (car (gimp-image-width inImage)))
(theFloatingSelection) ; an undefined variable to be defined below.
(theType (car (gimp-drawable-type-with-alpha inDraw))) ; returns
the drawables' type with an Alpha Channel
(theSelection) ; undefined variable to contain the selected area in
the image.
(theResult) ; undefined variable created below to hold the contents
of the Copied Layers
(theOpacity (car (gimp-layer-get-opacity inDraw))) ; for layer opacity
)
; Begin Undo Group
(gimp-image-undo-group-start inImage)
; Copy the selection from the current layer
(gimp-edit-copy inDraw)
; Get the selected area in the image and save it to a channel
(set! theSelection (car (gimp-selection-save inImage)))
; Create a new layer called "Cpoied Layer" to hold the pasted selection
(set! theResult (car (gimp-layer-new inImage theWidth theHeight
theType "Copied Layer" theOpacity NORMAL-MODE)))
; Fills theResult Layer (aka Copied Layer) with transparent fill
(gimp-drawable-fill theResult TRANSPARENT-FILL)
; Adds theResult Layer to the active image
(gimp-image-add-layer inImage theResult 0)
; Defines theFloatingSelection variable as containing the pasted
layer and keeping the selection active
(set! theFloatingSelection (car (gimp-edit-paste theResult FALSE)))
; Anchor theFloatingSelection to theResult
(gimp-floating-sel-anchor theFloatingSelection)
; Reload the original selection (theSelection)
(gimp-selection-load theSelection)
; Delete the channel holding the original selection (theSelection)
(gimp-image-remove-channel inImage theSelection)
; End Undo Group
(gimp-image-undo-group-end inImage))
; Update display
(gimp-displays-flush))
(script-fu-register "copy-paste-new-layer"
"/Edit/Copy/Copy & Paste as Layer"
"Copies the selection to a new layer and pastes it in
into active image"
"Art Wade"
"Art Wade"
"December 2007"
""
SF-IMAGE "SF-IMAGE" 0
SF-DRAWABLE "SF-DRAWABLE" 0
)
Greetings.
--
??????????????????????
Choi, JiHui
http://Mr-Dust.pe.kr
http://GIMP.kr
------------------------------
_______________________________________________
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
End of Gimp-user Digest, Vol 66, Issue 13
*****************************************
Alchemie Foto\grafiche
---------------------------------
Inviato da Yahoo! Mail.
Il servizio di posta con lo spazio illimitato.
_______________________________________________
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user