Easily copying selections to a file?
This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.
This is a read-only list on gimpusers.com so this discussion thread is read-only, too.
Easily copying selections to a file? | Joshua McGee | 10 Nov 21:25 |
Easily copying selections to a file? | Alec Burgess | 11 Nov 05:54 |
Easily copying selections to a file? | David Gowers | 11 Nov 06:00 |
Easily copying selections to a file? | Joao S. O. Bueno | 11 Nov 13:16 |
Easily copying selections to a file? | David Gowers | 11 Nov 13:29 |
Easily copying selections to a file? | saulgoode@flashingtwelve.brickfilms.com | 13 Nov 20:53 |
Easily copying selections to a file? | David Herman | 14 Nov 02:27 |
Easily copying selections to a file?
Hello,
I sell postage stamps. For inventory photos, I scan whole "stocksheets" (black backing, acetate strips to hold the stamps) with the stamps in place, then use GIMP to cut out the individual stamps for listing.
Right now, I draw a rectangular selection around each stamp, then CTRL-C, CTRL-SHIFT-V, CTRL-SHIFT-S, type a name. I can do this pretty quickly, but my wrists would thank me if there were a way to bind this series of keypresses to one keystroke, or to have a sort of "Copy to" like the old Windows Paint program had.
Sorry if this is a ridiculously easy question.
Joshua McGee http://www.mcgees.org
Easily copying selections to a file?
Joshua McGee (joshua@mcgees.org) wrote (in part) (on 2008-11-10 at 15:25):
I sell postage stamps. For inventory photos, I scan whole "stocksheets" (black backing, acetate strips to hold the stamps) with the stamps in place, then use GIMP to cut out the individual stamps for listing.
Right now, I draw a rectangular selection around each stamp, then CTRL-C, CTRL-SHIFT-V, CTRL-SHIFT-S, type a name. I can do this pretty quickly, but my wrists would thank me if there were a way to bind this series of keypresses to one keystroke, or to have a sort of "Copy to" like the old Windows Paint program had.
Sorry if this is a ridiculously easy question.
see Guillotine - http://docs.gimp.org/en/plug-in-guillotine.html
draw guides to separate individual stamps as desired then use: /Transform/Guillotine to create individual images
Having done that you will probably want to save all created images.
Saul Goode wrote "script-fu-save-all-images" see: http://www.nabble.com/Save-all-opened-files-with-ONE-click,-or-with-script...-td13893653.html I don't think this has an official home anywhere?
Easily copying selections to a file?
On Tue, Nov 11, 2008 at 6:55 AM, Joshua McGee wrote:
Hello,
I sell postage stamps. For inventory photos, I scan whole "stocksheets" (black backing, acetate strips to hold the stamps) with the stamps in place, then use GIMP to cut out the individual stamps for listing.
Right now, I draw a rectangular selection around each stamp, then CTRL-C, CTRL-SHIFT-V, CTRL-SHIFT-S, type a name. I can do this pretty quickly, but my wrists would thank me if there were a way to bind this series of keypresses to one keystroke, or to have a sort of "Copy to" like the old Windows Paint program had.
Sorry if this is a ridiculously easy question.
Alec's idea is pretty elegant. My ideas are below.
On Linux, you can use xDoTool for this; You would basically create a noninteractive Python plugin which runs the following command using os.system():
xdotool key Ctrl+C Ctrl+Shift+V Ctrl+Shift+S
If, for example, you always saves PNGs, you might want to add to that:
xdotool key Ctrl+C Ctrl+Shift+V Ctrl+Shift+S Delete period p n g Home
so, delete whatever filename is already in the File field, type '.png' and return to the start of the line.
On Windows, you may be able to use AutoIt in a similar way.
Alternatively you could use GIMP's pdb calls to accomplish this, something like this:
pdb.gimp_edit_copy (drawable)
newimage = pdb.gimp_edit_paste_as_new ()
filename = filename
pdb.gimp_file_save (newimage, drawable, filename, filename)
where filename is a parameter that you can choose via the PythonFu automatic GUI.
I have no idea what the old Windows Paint did.
David.
Easily copying selections to a file?
On Tue 11 Nov 2008 03:00:11 am David Gowers wrote:
On Tue, Nov 11, 2008 at 6:55 AM, Joshua McGee wrote:
Hello,
I sell postage stamps. For inventory photos, I scan whole "stocksheets" (black backing, acetate strips to hold the stamps) with the stamps in place, then use GIMP to cut out the individual stamps for listing.
Right now, I draw a rectangular selection around each stamp, then CTRL-C, CTRL-SHIFT-V, CTRL-SHIFT-S, type a name. I can do this pretty quickly, but my wrists would thank me if there were a way to bind this series of keypresses to one keystroke, or to have a sort of "Copy to" like the old Windows Paint program had.
Sorry if this is a ridiculously easy question.
Alec's idea is pretty elegant. My ideas are below.
On Linux, you can use xDoTool for this; You would basically create a noninteractive Python plugin which runs the following command using os.system():
David --
I fail to perceive in which ay this could be any better than a plug-in that simply does the copy, paste as new, save in first place, without loopback keyboard input hacks.
As for Joshua - just e-mail me confirming you can run python plug-ins, and re-state your need , and I can make such a script in little time.
Just --- have you tried simply reassing the shortcuts? You can enable "dynamic keyboard shortcuts" in preferences->interface (and also, turn of mnmonics, so you can have single letter shortcuts, instead of ctrl+shift+alt+ KEY things).
Maybe if you have "C" copy, "V", paste as new, and "B" save as you are better of then with any script we could think of.
(and you don? need to save these shortcuts - iwtih dynamic shrotcuts on, you can simply assign then each time you are slicing a sheet of stamps, and have the defaut shortcuts load at the next gimp restart)
js ->
xdotool key Ctrl+C Ctrl+Shift+V Ctrl+Shift+S
If, for example, you always saves PNGs, you might want to add to that:
xdotool key Ctrl+C Ctrl+Shift+V Ctrl+Shift+S Delete period p n g Home
so, delete whatever filename is already in the File field, type '.png' and return to the start of the line.
On Windows, you may be able to use AutoIt in a similar way.
Alternatively you could use GIMP's pdb calls to accomplish this, something like this:
pdb.gimp_edit_copy (drawable) newimage = pdb.gimp_edit_paste_as_new () filename = filename
pdb.gimp_file_save (newimage, drawable, filename, filename)where filename is a parameter that you can choose via the PythonFu automatic GUI.
I have no idea what the old Windows Paint did.
David.
Easily copying selections to a file?
On Tue, Nov 11, 2008 at 10:46 PM, Joao S. O. Bueno wrote:
On Tue 11 Nov 2008 03:00:11 am David Gowers wrote:
On Tue, Nov 11, 2008 at 6:55 AM, Joshua McGee wrote:
Hello,
I sell postage stamps. For inventory photos, I scan whole "stocksheets" (black backing, acetate strips to hold the stamps) with the stamps in place, then use GIMP to cut out the individual stamps for listing.
Right now, I draw a rectangular selection around each stamp, then CTRL-C, CTRL-SHIFT-V, CTRL-SHIFT-S, type a name. I can do this pretty quickly, but my wrists would thank me if there were a way to bind this series of keypresses to one keystroke, or to have a sort of "Copy to" like the old Windows Paint program had.
Sorry if this is a ridiculously easy question.
Alec's idea is pretty elegant. My ideas are below.
On Linux, you can use xDoTool for this; You would basically create a noninteractive Python plugin which runs the following command using os.system():
David --
I fail to perceive in which ay this could be any better than a plug-in that simply does the copy, paste as new, save in first place, without loopback keyboard input hacks.
Then you have succeeded. Alternatively, you could pay attention to the difference in workflow.
David
Easily copying selections to a file?
Quoting Joshua McGee :
I sell postage stamps. For inventory photos, I scan whole "stocksheets" (black backing, acetate strips to hold the stamps) with the stamps in place, then use GIMP to cut out the individual stamps for listing.
I have written a simple script which will add a command ("Save selected") to the File Menu. When executed, the current selection will be saved to a PNG file in the same directory as the file being edited. The name of the saved selection consists of the original file name with a sequence count appended ("original_name-1.png" for the first selection that's saved, "original_name-2.png" for the second, etc). If the script is executed with no selection, the sequence count is reset back to "1". The sequence count is also reset back to "1" if the image is reloaded.
The script has been tested with GIMP 2.6.2 and I suspect it should
work with GIMP 2.4 (I doubt it will work with earlier GIMPs). The
script can be downloaded from
http://flashingtwelve.brickfilms.com/GIMP/Scripts/save-selected.scm
Easily copying selections to a file?
On Thursday 13 November 2008,
saulgoode@flashingtwelve.brickfilms.com wrote:
---------snip----------
The script has been tested with GIMP 2.6.2 and I suspect it should work with GIMP 2.4 (I doubt it will work with earlier GIMPs). The script can be downloaded from http://flashingtwelve.brickfilms.com/GIMP/Scripts/save-selected.s cm
Thanks for the script, should be useful.