|S/He is eyeing you :)|
Sources: background, paste
Compilation and Set-Up Instructions
- You should know how to build of GIMP and GEGL from Git. A partially outdated guide is available here, and some things are explained in more depth here.
- Instead of building the GEGL master (main) branch, switch to the
soc-2011-seamless-clonebranch. You can do this by running
git checkout soc-2011-seamless-clone. Compile it with the regular flags – nothing special is needed.
- After building the updated version of GEGL, it’s time to build the updated version of GIMP. Switch to the
soc-2011-seamless-clone2branch, and build it.
- Before running GIMP, you must set the environment variable
p2t_refine_stepsto some number defining the maximal amount of points to be used in the mesh (in plain English, more should theoretically produce better result). I know this is annoying, I will get rid of it as soon as I finish debugging a certain code part. The typical number I use is 500 for pastes of around 200x200 pixels, and you should probably increase it if you wish to work on large pastes. If you are using the bash terminal, do
export p2t_refine_steps=500(and change the number as you wish)
- Run GIMP.
- Run Gimp :)
- Open the image that you wish to use as the background, and open the image you wish to paste into the background. Copy the part you want to paste. Note that opacity of that part will be treated as if it was binary – parts under 50% opacity will be removed, parts of more than 50% opacity will be completely opaque. The shape can be any shape, as long as it follows the following rules:
- It must not have holes (Temporary limitation)
- It must be continuous, i.e. composed of only one part (Temporary(?) limitation)
- It must not have any long thin areas (Temporary(!) limitation).
This means that if you have any area which is 1 pixel wide and is 3 pixels long or more (i.e. a thin spike), it will crash. Solution for this was already devised, I just need to code it. Select the Seamless-Clone Tool (Either by clicking the second tool on the toolbox that has the same icon as the move tool, or by doing Shift+L).
- Click anywhere on the canvas while the background layer is active. The paste will be centered on the cursor, and so the cursor should be in a place where the entire paste is inside the background boundaries (both inside the rectangle defining the layer, and inside an area where all the background below it is opaque). This limitation will be enforced by the User Interface later.
- Move the paste by clicking on it, dragging and releasing. If you move it slow enough (which actually shouldn’t be so slow), you’ll see the preview updating while you are moving.
- Click Enter to Apply the effect.
- All the above mentioned crashes and bugs :)
- Due to not yet complete memory management, the tool leaks memory from it’s preprocessing.
- Converting to tile-based processing is NOT 100% done, so it may crash on large pastes. Don’t ask me how large since I didn’t try anything more than 300x300 on my machine.
- Integrate the tool with the help system
- Test better the interaction when the the active image/display/drawable are switched during the interaction of the tool.
- Get a decent tool icon. Anyone with ideas for the visual metaphor to be used by a seamless paste tool, is more than welcome to leave them here as comments! I do design icons, but I don’t have an idea for this one.
Hello, great news!ReplyDelete
Here's some ideas for icon: http://i.imgur.com/K80y3.png
Thanks - Those are some very good ideas - especially the two bottom left ones :)ReplyDelete
Hey dude,,, I couldn't find your branch in Gimp git.. Can you pls provide the path?ReplyDelete