If you'd like to upload plug-ins, please create an account below. Otherwise (e.g. for download or commenting) you do not need one! Enjoy :-)
As a technical editor/writer, I found the need for a plugin to easily crop application screenshots with that somewhat jagged "torn-off" appearance. I found a way to manually obtain the effect I needed, and simply replicated the steps in a Python script, using the gimpfu module.
To install the plugin:
1. Put the Python file in the plug-ins folder in the GIMP settings folder in your home folder (or your user settings folder on Windows). That is, if you're using GIMP 2.4 under Linux, the folder would be ~/.gimp-2.4/plug-ins/ and with GIMP 2.6, ~/.gimp-2.6/plug-ins/. Under Windows, you could go to C:\Documents and Settings\\ and search for folders whose names contain "gimp", then go to the plug-ins folder under that.
2. Under Linux, make the file executable (chmod u+x scrnshot_tearoff.py). This is not required for Windows.
3. (Added thanks to comments) If you don't have Python and PyGTK installed, you'll need to install them. This is most likely to happen for Windows computers; many Linux distributions install Python by default. Head to http://www.python.org/download/ and http://www.pygtk.org/downloads.html for Windows installables; for Linux, use your distribution's package management tool to look for and install Python and PyGTK.
4. (Re)start GIMP.
The plugin puts a "Tear-off" menu item on the Image menu for all image windows only (that is, no menu option is available in the main GIMP Toolbox window's menus). Capture your screenshot, or open a saved image; select the area of the image that you want to keep; click Image > Tear-off to get a dialog where you can modify the plug-in parameters.
Play with the plugin parameters to see what startlingly different results you can get. Sorry, I haven't yet figured out how to do a 'Reset to Defaults' button like some other plug-ins have :-(
This script has been tested in the following environments, but should run in a lot more:
- Ubuntu Linux 7.10 // Python 2.5.1// GIMP 2.4.2 // gimp-python 2.4.2-0ubuntu0.7.10.1
- Ubuntu Linux 8.10 // Python 2.5.2// GIMP 2.6.1
Hope you find this plug-in useful!
Ed.
---
Edgar D'Souza (http://edgar.b.dsouza.googlepages.com/)
| Attachment | Size |
|---|---|
| scrnshot_tearoff.py | 10.48 KB |
Comments
Works with Gimp 2.6 under MacOSX
I found that Gimp 2.6.6 did not create a .gimp-2.6 directory in my home area under MacOS 10.5.7. So I did the following.
Make a directory in your Mac home area:
mkdir gimp-plug-ins
(you could call it .gimp-2.6/plug-ins if you like and it won't show up in Finder.)
Put the scrnshot_tearoff.py file in your new directory:
cp scrnshot_tearoff.py ~/gimp-plug-ins
Start Gimp and go to Edit->Preferences->Folders->Plug-ins
Add a new plug-in folder. It's name will be something like /Users//gimp-plug-ins - use the Browse button on the directory chooser if you are unsure how to type this in.
Restart Gimp and you should see the Tear Off item under the Image menu.
Great plug-in. Works like a charm. Does exactly what I want. Thanks Ed.
Works with Gimp 2.6 under MacOSX - thanks!
You're welcome, and thank you very much for the MacOSX steps! Hopefully that will enable more people to use the plugin.
Thanks,
Ed.
---
Edgar D'Souza (http://edgar.b.dsouza.googlepages.com/)
A couple comments on the code
The PDB function 'gimp-edit-clear' can be used instead of cutting to a named buffer.
Also, cutting the (contents of a) selection should not result in loss of the selection as stated in Comment 6A. My guess is that during your testing of this, you performed a Paste (an operation which would cause the selection to be forgotten) and then deleted the floating layer.
Thanks for the code tips
Saul,
Thanks for the code tips. I'll try them out with my current GIMP 2.6 but am not sure if making the changes means it will stop working for GIMP 2.4... IIRC I'd tried gimp-edit-clear but it just didn't work for me then. I guess I can upload a separate script file with the changes, and that way people can download and try each.
Thanks,
Ed.
Edgar D'Souza (http://edgar.b.dsouza.googlepages.com/)
Superb
Fantastic script thanks - just what I was looking for!
very nice script
Excellent Script - I like it very much - (I'm adding a screenshot)
Thanks for the feedback!
Thanks for trying it out and letting me know it works! :-) Appreciate it.
Regards,
Ed.
Edgar D'Souza (http://edgar.b.dsouza.googlepages.com/)
===
The gene pool could use a little chlorine.
.py format?
I can't install this script because it has a .py format. Aren't scripts supposed to be in .scm format? Please Help!
its written in python, not
its written in python, not scheme, which means that you will have to have python installed on your computer to have it work (with pygtk and others)
If you've installed on Windows, please tell me what's needed?
Hi,
If you've gotten the script working under Windows, could you please tell me what extras must be installed to get it to work? I'm kicking myself for forgetting to mention 'install Python' (added it and PyGTK now, thanks to your pointer) - this is what comes of being a full-time Linux user :-)
Thanks,
Ed.
Edgar D'Souza (http://edgar.b.dsouza.googlepages.com/)
If you've installed on Windows, please tell me what's needed?
this http://www.registry.gimp.org/node/3916
Hi Dear, I've download &
Hi Dear,
I've download & installed the all-in-one easy pack of Python mentioned above (with Window restart in mentioned place).
Then I install the latest GIMP 2.6.6 > start GIMP > close GIMP > copy the "scrnshot_tearoff.py" to "C:\Documents and Settings\myname\.gimp-2.6\plug-ins" > start GIMP again > open an image.
However, there is no "Tear off" item under the "Image" menu.
So I try to download GIMP 2.6.1 from here: http://www.filehippo.com/download_the_gimp/4760/, and retry the procedure, but "Tear off" still doesn't appear.
Do you have any suggestion on what I've been missed? Thank You.
I would love the answer to
I would love the answer to this as well. I'm having the same problem.
Sad to hear you're having problems
Since other users appear to have gotten it working with (earlier versions of) GIMP under Windows, I am guessing that some change with the new version of GIMP may be the issue, as mentioned at:
http://www.gimpusers.com/forums/gimp-user/10670-python-support.html
Have you tried reinstalling GIMP 2.6.6 with the "custom" option, and in the following dialog checked the "python" checkbox - as mentioned in the above page? The page also mentions that pycairo, pygobject, and pygtk need to be the new versions (the post by Alec Burgess) - have you tried manually installing those?
If you have tried all those, then does the Filters>Python-Fu>Console show up? If not, then there is probably still some issue with the Python installation (and its libraries), or perhaps with enabling Python support in GIMP 2.6.6.
I regret that I don't use Windows, so I cannot try this out on my own computers to see if I could get it working.
Regards
Ed.
Edgar D'Souza (http://edgar.b.dsouza.googlepages.com/)
It works on Windows
First, uninstall Gimp 2.6.6 and install Gimp 2.6.5. Gimp report that there is a problem with Python support for the Windows 2.6.6 version.
Second, edit the .py file: add a comment (#) at the beginning of line 50 and un-comment line 52 to enable log writing.
Then restart Gimp, open an image and find "Tear Off" at the bottom of the Image section.
Works great!
Thank you Ed.
Update needed for default log file name on Windows
Thank you for prodding me, and for spelling out what should've been obvious to me :-( namely that if the log filename wasn't changed, it would break the script.
I have some free time, so I'm adding some code to try and determine whether the OS is Windows or Linux/POSIX and provide an appropriate default log filename... I hope to upload the fixed version soon.
Thanks,
Ed.
---
Edgar D'Souza (http://edgar.b.dsouza.googlepages.com/)
Python support does work
Python support does work fine in 2.6.6. Where did you get the problem reports from?