For those of you who want a bigger preview and somewhat better liquify tool than IWARP - this tutorial is for you.Note: This is for Windows users only
If you can get Paint Dot Net to work in any other platform than you can probably do this also.But as far as i know PDN only works with Microsoft Frame Works, so good luck with that.
This Python Module was originaly written by Rob A to call XnView for PS filters as Gimp-2.6.11 seems to have lost it's way with PSPI plug-in.That is to say many 8bf's fail in the new version of Gimp, and XnView handles all of them nicely.
The Python Module has been edited by me to call Paint Dot Net instead.
Paint Dot Net uses user submitted plug-ins and filters just like Gimp does, and its also free source.What you will need - Download Paint Dot Net here with Microsoft Frame Work
- http://www.getpaint.net/download.htmlThe Python-Fu setup for Gimp(Note: Not needed if you use the partha builds!)
- http://www.gimpusers.com/tutorials/inst ... -6-windowsThe Python Module (The script you can find below)
The setup is well worth it if you want to use all of PDN's filters in Gimp.What the module does -
This python module takes the current layer or new from layer and transfers it to Paint Dot Net, where you can use any filter on it there and it will save and import back to Gimp after editing in PDN. (more explanation on that to follow)
So here is the tutorial - edited by Maffe to make it a little easier to follow.
If you have ANY questions PM me and ill help you out.
A Python file Rob A created to call XnView, that now calls Paint Dot Net instead - Because i wanted a nice Liquify tool.
First off you have to have a Windows operation system. - Windows XP - Confirmed by Owl700
- Vista - Confirmed by Maffe811
- Windows 7 - Not confirmed
For 64-bit you can use Partha's portable versions of 2.7
, but it is available in both 32-bit and 64-bit!
The Partha versions also comes with python built in, so you dont' have to worry about the next step.
And you need Python installed, if you haven't read this
You have to have Paint . Net installed as well as Microsoft.net framework.
The paint dot net comes with that installer already so no need to hunt it down.
Then you have to go to paint dot nets plug-in area and grab the Liquify filter or you can download this zip.
It has a lot of other cool filters included with liquify
Install it in Paint dot net. use the auto filter installer herehttp://forums.getpaint.net/index.php?ap ... ch_id=3910
Or just unzip the package of filters to the effects folder in the paint dot net directory under Program Files.
Then grab this file Paint.NETShell.py
by righ clicking and "save link as..." Make sure its saved as a .py file
The code lays in a spoiler below if the link goes bad.
In that case:
- Open a text editor
- Paste the code
- Save as Paint.NETShell.py
- Place it in your Plug-ins folder (C:\Users\*Your username*
In Gimp you will find the plugin under Filters/Call/PaintDotNetHow to use it
Create or open an image you want to liquify
Run the script Filters/Call/Paint Dot Net
Paint dot net will open with your temp image loaded
Run the liquify tool/filter under effects/tools
Click the close button on Paint Dot net
The filter script will ask you if you want to save the changes to the temp Gimp file choose yes.
The script will then close paint dot net, export the new image layer back to Gimp and place it as a new layer on top.
Code in here incase link goes down:
- Code: Select all
Call Paint.Net to allow use of Paint.Nets filters. Windows Only.
0.3 Fixed to work with filters that change alpha
this script is modelled after the mm extern LabCurves trace plugin
by Michael Munzert http://www.mm-log.com/lab-curves-gimp
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; version 3 of the License.
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.
The GNU Public License is available at
from gimpfu import *
import os, sys
def plugin_main(image, drawable, visible):
# Copy so the save operations doesn't affect the original
if visible == 0:
# Save in temporary. Note: empty user entered file name
temp = pdb.gimp_image_get_active_drawable(image)
# Get the current visible
temp = pdb.gimp_layer_new_from_visible(image, image, "Visible")
buffer = pdb.gimp_edit_named_copy(temp, "PaintDotNETShellTemp")
#save selection if one exists
hassel = pdb.gimp_selection_is_empty(image) == 0
savedsel = pdb.gimp_selection_save(image)
tempimage = pdb.gimp_edit_named_paste_as_new(buffer)
if not tempimage:
tempdrawable = pdb.gimp_image_get_active_layer(tempimage)
# Use temp file names from gimp, it reflects the user's choices in gimp.rc
# change as indicated if you always want to use the same temp file name
tempfilename = pdb.gimp_temp_name("png")
#tempfilename = os.path.join(tempfile.gettempdir(), "Inkscapetempfile.png")
# !!! Note no run-mode first parameter, and user entered filename is empty string
pdb.gimp_progress_set_text ("Saving a copy")
pdb.file_png_save_defaults(tempimage, tempdrawable, tempfilename, tempfilename)
# Command line - Change to match where you installed XnView
command = "\"C:\\Program Files\\Paint.NET\\PaintDotNet.exe\" \"" + tempfilename + "\""
args = shlex.split(command)
# Invoke external command
pdb.gimp_progress_set_text ("run PaintDotNET...")
child = subprocess.Popen(args, shell=False)
# put it as a new layer in the opened image
newlayer2 = pdb.gimp_file_load_layer(tempimage, tempfilename)
buffer = pdb.gimp_edit_named_copy(newlayer2, "PaintDotNETShellTemp")
if visible == 0:
sel = pdb.gimp_edit_named_paste(drawable, buffer, 1)
sel = pdb.gimp_edit_named_paste(temp, buffer, 1)
#load up old selection
os.remove(tempfilename) # delete the temporary file
gimp.delete(tempimage) # delete the temporary image
# Note the new image is dirty in Gimp and the user will be asked to save before closing.
"Copyright 2011 Rob Antonishen",
[ (PF_RADIO, "visible", "Layer:", 1, (("new from visible", 1),("current layer",0)))
I know it seems like a lot to go through just for Liquify, but you will also get all the other PDN effects with it.