A fix to the Filter>Enhance>Smart remove selection... script.
Release notes:
Fixed a bug where strange texture (e.g. sky from the top of the image) instead of surrounding texture was synthesized onto the selection, as reported at this website for the resynthesizer plug-in.
Changed the menu item to "Filter>Enhance>Heal selection..." from "Smart remove selection..." (New menu item name is shorter and more descriptive. It doesn't use the Heal tool, but the effect is nearly the same. Note the filename is the same, only the menu item name is changed, and it still requires the resynthesizer plug-in.)
Changed the pop-up help text.
Installation:
Copy file smart-remove.scm to the standard place for scripts. See Preferences>Folders>Scripts for the pathnames. In my case, using Linux Ubuntu, I removed the current version at /usr/share/gimp/2.0/scripts/smart-remove.scm and installed the new version at ~/.gimp-2.6/scripts/smart-remove.scm. (It seems strange that Gimp will not use a script from your home folder if there is also one of the same name in the standard installation folder, but it will for a plugin?)
| Attachment | Size |
|---|---|
| smart-remove.scm | 4.06 KB |
Comments
Selection script still problem and texture depends on screen pos
I'm using Gimp portable in XP
tried even the latest? 0.16 version of resynthesizer http://gimp.foebud.org/node/24255
I notice that when i make a selection even with the new script resynthesizer does takes an area from above.
But i noticed more things go wrong its not only that.
If i make a selection use the tool i get something from the top of my picture
Then i perform an undo of this action so the selection stays the same.
Then i move the gimp window that contains the picture
Move it up left / right / up /down..etc
And each time perform a resynthesize + undo then each filling becomes different
This might indicate that the resynthesizer has a wrong reading of screen pixel location and uses the actual main screen of windows (instead of relative coordinates based on where the window is), or something like that. As It shouldn't matter where the screen is located.
Resynthesizer still problem texture depends on screen pos
The resynthesizer uses the clock for the seed of its random number generator. Therefore, you would expect to get slightly different results each time you use it, even if all other conditions are the same. I think that should be changed.
Are the results are not only slightly different, but "wrong" in some sense? Possibly you are really not using the corrected "Heal selection" script.
There is also a bug where it gives "wrong" results if there is an alpha channel and transparent areas around the selection. Then it seems to heal with black splotches.
Resynthesizer
I am using Gentoo Linux.
I d/led the resynth source code from this link.
http://www.logarithmic.net/pfh/resynthesizer
I did make install and it installed everything correctly.
However resynth didn't show up in Filters>Map.
I opened resynth in ~/.gimp-2.6/scripts and saw that it was compiled for 32 bits while my system and the Gimp are 64 bits.
Looking at the Makefile I noticed the first line contained:
CC = g++.
I checked /usr/bin and found a symlink to g++-4.3.4.
I modified the Makefile to:
CC = g++-4.3.4
and reinstalled.This time it showed up in Filters>Map and was compiled 64bit.
I am not very familiar with other Linux distro's but something similar might happen there.
The g++ compiler is used to produce 32bit code for apps that need it.
Thanks bootchk for your smart remove script.
Gerard.
fix for windows
RESYNTHESIZER INSTALLING for Gimp 2.6.7 Windows
Hello,
May s.o explain me. How i do this? With the Editor?
- Install plugin resynthesizer-for-Windows-0.13b
- Take the modified script from this thread
- change "(plug-in-resynthesizer 1 img layer 0 0 1 workLayerID -1 -1 0.0 0.117 16 500)"
by "(plug-in-resynthesizer 1 img layer 0 0 1 workLayerID -1 -1 0.0 0.117)"
save script in script directory
Thanks a lot.
that is not for install
it is explained how to modify a script that may use the plugin
Nothing relate to install, you install the plugin as usual(should be a exe file you may just drop it in a plugin folder)
the scripts instead have a different extension (.scm) and should be added to the gimp script folder
they may also be opened with a text editor, as the notepad, to do edits as that suggested
Anyway the script depend from the plugin not vice versa, so RES will works also if the scripts are not installed
trouble with fix for windows
notepad
the problem is: notepad! it seems to put any other code into the scm file and currupt it.
thats how I did the change:
download the orginal *.scm
open it in an editor and search for the line above. and just delete the last two digits: 16 500 and save it.
put it into the original standard script folder (programfiles > gimp > share > ...)
and it works fine!
use Wordpad instead
besides notepad there is still wordpad on many versions of windows which does it correctly.
If a different editor is
If a different editor is used, then I'd suggest to get one that's really suited for source code, e.g. Notepad++
http://notepad-plus.sourceforge.net
Duh..
it only has to do with ansi code of the document as this is asci stuff
notepad++ or wordpad it doesnt matter, there is no preferred tool both can do that.
The only ++ is you dont have to install anything as wordpad is allready installed.
:)
may matter because Windows
may matter because Windows notepad is a bit buggy so as example may break the inline
Sure not often but when does the script become unasable, at least for average users
Thank you : works with 2.6 and Windows now
Thank a lot !
what other resynthesizer scripts broken?
other scripts built on resynthesizer:
I've written one
resynthesized pattern
Rob I really need your great script (fill with resynthesized) I tried to get it at faat.pointclark.net/incoming/ but only found the coding and not a .scm file. I am not able to get it to run. do you have a .scm file some where ? I am on mac os btw
appreciate it.
the coding and the scm file
the coding and the scm file are the same thing
I try to explain better if you got to that "code" page with your browser ,IE, firefox oe whatever, you should see, in the browser adress field that the page is called..hem...whater.scm and not whatever.html
so save the page from the browser should save the scm
Even more simple instead then click on the Link, RIGHT click and chose the option "save target as"
In case you may see a option to save as txt...click On that option, that should expand the field were the option is displayed and show the correct one "save as ALL FILES"
this at least in Windows
resynthesized pattern fill
Thanks, was brain dead the other nite. So added resynth_pattern_fill.scm to my scripts file and all looks good but when I run it I get the error: wrong number of parameters expecting 13 only have 11 (as mentioned in other posts). I tired the fix by changing the two lines (plug-in-resynthesizer RUN-NONINTERACTIVE newImage newLayer 0 0 0 newLayer -1 -1 0 0.05) to (plug-in-resynthesizer RUN-NONINTERACTIVE newImage newLayer 0 0 0 newLayer -1 -1 0 0.05 30 200) but no luck Still get error expecting 13 parameters. Any thoughts?
Updated
I've updated the resynth pattern fill script here: http://ffaat.pointclark.net/incoming/scripts/resynth_pattern_fill.scm
It now checks for the number of parameters and provides teh correct amount. I have tested it with the 11 and 13 parameter versions. (BTW I added the 30 and 200 default values and this is working for me).
Try that and see if it works. If so, all the scripts that use resynthesizer could use the same check.
-Rob A>
Working good for me
Thanks for the update, Rob.
Fill with resynthesized pattern
the 12th and 13th parameters
Finally had a chance to
Finally had a chance to review the Script-fu again. Your fix worked. Thanks. :)
Resynthisizer parameters.
windows versions of resynthesizer
hmm...
Get errors too.
More examples
What can I say; fantastic.
Will download and give it a whirl.
Credit to bootchk
Whoops; had to link the
Whoops; had to link the Script-fu on another forum I frequent and just noticed. This. Apologies to bootchk. Still, this Script-fu is one of my favorites. :)
screenshots
Sample
resynthesizer sample not perfect
resynth smart remove selection not working
Howdy,
I've downloaded 2.6.8 and have tried resynth and smart remove selection for editing but they are no where near the quality of yours. The resynth leaves big splotchy color and pulls images down from the top.
Please help!
Thanks!