You are here

[Bug] GIMP 2.10+ Python and Resynthesizer Plug-In Issues

11 posts / 0 new
Last post
lostamiga
Offline
Last seen: 1 month 2 weeks ago
Joined: 2020-04-16 15:12
[Bug] GIMP 2.10+ Python and Resynthesizer Plug-In Issues

Using the latest version of GIMP Portable, installed to the Desktop, I have tried to install the newer (I think) GIMP Resynthesizer plugin referenced in the Resynthesizer YouTube tutorial at:
https://www.youtube.com/watch?v=Yn7j4_KmPp0

I think this plug-in is newer than Resynthesize 0.13b, which I have used in the past. This newer version has additional options and features that (to me) seem to be a great improvement.

But, in GIMP Portable, the only new filter option is Resynthesize, found under FILTERS/MAP.

The YouTube tutorial shows a much more effective tool, Heal Selection, which should show up under FILTERS/ENHANCE.

In GIMP Portable, this additional filter does not show up (along with several others). In GIMP Portable, I installed all the appropriate *.py files and the two executables in Desktop\GIMPPortable\Data\.gimp\plug-ins folder, but again, only the single Resynthesize option is available after doing this.

As an additional test, I downloaded GIMP 2.10.18 (normal full version from the GIMP site, not the PortableApps version) and installed it using Windows Sandbox, then like above, placed the same plug-in files for Resynthesizer in:
C:\Program Files\GIMP 2\lib\gimp\2.0\plug-ins folder.

That version of GIMP, running from the Sandbox, has many additional Filters, including the missing FILTERS/ENHANCE/HEAL SELECTION which is NOT present in GIMP Portable. (as well as the other filters I have yet to try)

This tool (Heal Selection) is AMAZING in its ability to automatically remove selected portions of an image and blend the resulting void in with the background.

Can anyone please help me troubleshoot why these *.py additional features of Resynthesizer's plug-in do not work with GIMP Portable?

Thanks so much, especially for such a great thing as Portable Apps!!!

John T. Haller
John T. Haller's picture
Online
Last seen: 35 min 49 sec ago
AdminDeveloperModerator
Joined: 2005-11-28 22:21
Correct Location

Whatever you install to C:\Program Files\GIMP 2\lib\gimp\2.0\plug-ins in the local version should be installed to GIMPPortable\App\gimp\lib\gimp\2.0\plug-ins in the portable version.

Sometimes, the impossible can become possible, if you're awesome!

lostamiga
Offline
Last seen: 1 month 2 weeks ago
Joined: 2020-04-16 15:12
Hi John, and thanks so much

Hi John, and thanks so much for your quick reply, and the AMAZING effort you put into PortableApps!

Also, please excuse my ignorance, as I have little if any programming experience, and really am stabbing in the dark troubleshooting this issue.

However, I do believe the problem of missing menu items (from Resynth 1.0) may be related to the Python problem mmjoshi posted about on 8 April:

https://portableapps.com/node/61928

I have the same issue as he trying to bring up the Python Console (Python-Fu), and get the same error as he did:

GIMP Message
Execution error for 'Console':
Failed to run plug-in "python-console.py"

GIMP Message
Unable to run plug-in "python-consloe.py"
(C:\Users\Amiga2\Desktop\PortableApps\GIMPPortable\App\gimp\lib\gimp\2.0\plug-ins\python-console\python-console.py)
Failed to execute child process (No such file or directory)

Could this be related to why GIMP doesn't "see" any of those new Python scripts (*.py files) I have placed in:
C:\Users\Amiga2\Desktop\PortableApps\GIMPPortable\Data\.gimp\plug-ins
(From everything I have read, this is the right place to put them, and one part of Resynth works, just not these additional scripts)

Also, searching the forum for clues, it looks like you may have had this issue on an earlier version:
https://portableapps.com/node/38576
Hopefully that helps, as I'm flying blind here...

Almost forgot, if it helps:

Running a new install of PortableApps Platform, with just GIMP loaded, from the DESKTOP.
Windows 10 Pro, 64-bit, version 1903
Intel Core i9-9900K
32 GB Ram

Thanks so much for any help!!!

lostamiga
Offline
Last seen: 1 month 2 weeks ago
Joined: 2020-04-16 15:12
Hi John,

Hi John,

Looks like I have too much time on my hands. After reading some of the other forum posts regarding GIMP and Python support, it looked like some previous versions may have had it working.

I performed some tests on past versions in the hope that you have the time and are willing to troubleshoot why the latest version doesn’t work with the Resynthesizer v1.0 plug-in.

So, I downloaded all the past PortableApps releases (from GitHub) for GIMP 2.10.##, and tested each with the plug-in.

I placed the Resynthesizer v1.0 plug-in files (either 32-bit or 64-bit, whichever worked) and its associated *.py scripts into the “GIMPPortable\Data\.gimp\plug-ins” folder.

My results are below. They indicate to me that I’m installing the plug-in properly in GIMP Portable, and the plug-in works flawlessly in some versions of GIMP Portable, but not the latest… Let me know if you want more details.

2.10.0.paf.exe – Works but with Python error messages
2.10.0_Rev_2.paf.exe – Works but with Python error messages
2.10.0-2.paf.exe – Works but with Python error messages
2.10.2.paf.exe – Works but with Python error messages
2.10.4.paf.exe – Works PERFECTLY!
2.10.6.paf.exe – Works PERFECTLY!
2.10.6_Rev_2.paf.exe – Works PERFECTLY!
2.10.8.paf.exe – Can’t test, as the GIMP crashes on any File operation
2.10.12_Test_1.paf.exe – Works PERFECTLY!
2.10.12_Test_2.paf.exe – Errors, reporting the app cannot start
2.10.12_Test_3.paf.exe – Works PERFECTLY!
2.10.12-3.paf.exe – Works PERFECTLY!
2.10.14.paf.exe – Works but with Python error messages
2.10.14_Rev_2.paf.exe – Works but with Python error messages
2.10.14-1.paf.exe – Works but with Python error messages
2.10.18-2.paf.exe – Does not work at all…

Please, if you have the time, see if you can find out what stops this plug-in from working in GIMP Portable 2.10.18-2. I would really like to have this plug-in working in the latest version of GIMP Portable.

I know you are very busy with other PortableApps work, and regardless, thank you for what you do!

mmjoshi
Offline
Last seen: 9 months 5 days ago
Joined: 2019-12-17 16:32
Great debugging effort! I can

Great debugging effort! I can confirm that the problem about python script errors which I had raised in my post https://portableapps.com/node/61371 does not happen in version 2.10.12-3. It happens in 2.10.14-1 and in version 2.10.18-2 no python scripts are loaded as mentioned in my post https://portableapps.com/node/61928. Interestingly, if I auto update from 2.10.12-3 to 2.10.18-2, no python scripts are loaded at startup!

Other portable versions of 2.10.18 do not have this problem. I would prefer to stick to the PortableApps platform since most of my portable apps are from here. Hopefully, this gets fixed soon!

mj

lostamiga
Offline
Last seen: 1 month 2 weeks ago
Joined: 2020-04-16 15:12
Latest GIMP Portable & Resythesizer Plug-In Problem (still)

Hi John,

I wanted to thank you first off for all the amazing hard work you do for this great set of portable apps! I can’t thank you (and the other contributors) enough!

I also realize you are very busy but respectfully request if you have time to take a look at the latest version of GIMP Portable and see if you can help solve the problem of running the Resynthesizer plug-in. As I stated in a previous post, various previous versions of GIMP Portable have had no problem running the plug-in, along with the latest full version of GIMP, but neither this newest version of GIMP Portable nor the one before run the plug-in correctly.

The last version of GIMP Portable to run it correctly WITHOUT any errors was 2.10.12-3.paf.exe. By “running correctly”, I mean it added eight new Filter Menu items corresponding to the associated *.py Python scripts in the “Resynthesizer” archive I mention at the end of this post. The most amazing demonstration of Resynthesizer is just one of the eight possible scripts called by “Filters/Enhance/Heal Selection” which is mind blowing (to me at least) how well it can automatically remove a selection from an image and attempt to recreate what would be the original background based on the surroundings. Another (“Enhance/Uncrop”) will automatically extend the borders of a picture, again automatically attempting to fill in the new areas to match the original image. There is a great explanation of each script at https://github.com/bootchk/resynthesizer

The last version of GIMP Portable to run it (semi) correctly was 2.10.14-1.paf.exe. Although it did run the plug-in very nicely, it did so while also reporting the following errors (which did NOT affect the outcome of the plug-in). I suspect these errors are not related to the current version not running it at all, but including for information if you can use it. The errors are:

GEGL-Message: 11:37:07.346: Module 'C:\Users\Amiga2\Desktop\GIMPPortable_2.10.14-1\App\gimp\lib\gegl-0.4\ff-load.dll' load error: 'C:\Users\Amiga2\Desktop\GIMPPortable_2.10.14-1\App\gimp\lib\gegl-0.4\ff-load.dll': The specified module could not be found.

GEGL-Message: 11:37:07.348: Module 'C:\Users\Amiga2\Desktop\GIMPPortable_2.10.14-1\App\gimp\lib\gegl-0.4\ff-save.dll' load error: 'C:\Users\Amiga2\Desktop\GIMPPortable_2.10.14-1\App\gimp\lib\gegl-0.4\ff-save.dll': The specified module could not be found.

To make sure it isn’t a problem with the latest full version of GIMP, I have installed the non-portable (full version) of GIMP via Sandbox on a computer to test and make sure it runs. The latest (full) version GIMP-2.10.20-setup-1.exe runs the plug-in flawlessly, including all eight new menu items (when saved to C:\Program Files\GIMP 2\lib\gimp\2.0\plug-ins folder). As I stated above, as recently as version 2.10.14-1.paf.exe, GIMP Portable ran the plug-in (mostly) flawlessly and various other previous portable versions did too. It’s only the last two version that haven’t run it in a while...

Is there any chance you could look at this issue and see if you can fix it?

I would be happy to help in any way I can, but my programming skills are minimal at best, limited basically to simple script writing. However, I am more than willing to provide testing, config info, or answer any questions you may have to help if I can.

Also, if it helps, here is some more detailed background information:

Resynthesizer Plug-In (latest Windows compiled version I can find), 32&64 bit version: http://www.mediafire.com/file/gwc928wmwti30g3/resynth_win_32_64.zip/file

A more supposedly “updated” version can be found at: https://www.gimp-forum.net/Thread-Resynthisizer-Heal-Selection-Runtime-E...

GitHub hosts the source (uncompiled – I think) along with other useful info: https://github.com/bootchk/resynthesizer

The new menu items (each via a Python script) are:

Enhance / Heal Selection
Enhance / Heal Transparency
Enhance / Enlarge & Sharpen
Enhance / Sharpen
Enhance / Uncrop
Image / Edit / Fill Pattern
Map / Style
Render / Texture

Thank you so much!!!

OAKside
OAKside's picture
Offline
Last seen: 4 months 2 weeks ago
Joined: 2010-07-23 19:12
Thanks a lot for this work,

Thanks a lot for this work, lostamiga.

I've been needing Resynthesizer lately for a bit of work. currently running PortableApps GIMP (2.10.20.1). After much failure with the plugin and troubleshooting... my Google-fu led my here. Your documentation of the problem is accurate; Basically, the last few PA versions do not have working Python script support. I'm just hoping this problem will be acknowledged and fixed for the next version. Resynthesizer is a killer plugin, thanks to "Heal selection" (Photoshop "content aware fill").

John T. Haller
John T. Haller's picture
Online
Last seen: 35 min 49 sec ago
AdminDeveloperModerator
Joined: 2005-11-28 22:21
Bug Progress

I've been playing with this for a while without updating. I noticed some issues with the pygimp.interp file not being properly updated, for instance. This is my current GIMPPortable.ini which seems to make it work occasionally under a set of circumstances I can't determine.

[Launch]
ProgramExecutable=gimp\bin\gimp-2.10.exe
WorkingDirectory=%PAL:AppDir%\gimp\bin
DirectoryMoveOK=yes
SupportsUNC=yes
MinOS=7

[Activate]
Ghostscript=find
Registry=true

[Environment]
GIMP2_DIRECTORY=%PAL:DataDir%\.gimp
HOME=%PAL:DataDir%\.gimp
PATH=%PAL:AppDir%\gimp\bin;%PAL:AppDir%\gimp\32\bin;%PAL:AppDir%\gimp\lib\gimp\2.0\python;%PAL:AppDir%\gimp\lib\gimp\2.0\plug-ins\python-console;%PATH%;
PYTHONPATH=%PAL:AppDir%\gimp\lib\gimp\2.0\python;%PAL:AppDir%\gimp\lib\gimp\2.0\plug-ins\python-console
LANG=%PAL:LanguageCustom%
GTK_BASEPATH=%PAL:AppDir%\gimp\bin

;[RegistryKeys]
;-=HKCU\Software\Classes\.svg

;[RegistryValueWrite]
;HKCU\Software\Classes\.svg\Content Type=image/svg+xml

[FilesMove]
settings\recently-used.xbel=%LOCALAPPDATA%
settings\gtkfilechooser.ini=%LOCALAPPDATA%\gtk-2.0

[DirectoriesMove]
fontconfig=%LOCALAPPDATA%\fontconfig
var=%PAL:AppDir%\gimp\var
-=%LOCALAPPDATA%\gegl-0.4
-=%LOCALAPPDATA%\babl-0.1
-=%USERPROFILE%\.thumbnails
-=%USERPROFILE%\Local Settings\Temporary Internet Files\gegl-0.4
-=%LOCALAPPDATA%\Microsoft\Windows\Temporary Internet Files\gegl-0.4
-=%LOCALAPPDATA%\GIMP

[DirectoriesCleanupIfEmpty]
1=%LOCALAPPDATA%\gtk-2.0

[Language]
Base=%PortableApps.comLocaleglibc%
CheckIfExists=%PAL:AppDir%\GIMP\share\locale\%PAL:LanguageCustom%\*.*
DefaultIfNotExists=en_US

[LanguageStrings]
sr_RS=sr
sr=sr@latin

[LanguageFile]
Type=INI
File=%PAL:DataDir%\settings\GIMPPortableSettings.ini
Section=GIMPPortableSettings
Key=Language

[FileWrite1]
Type=Replace
File=%PAL:DataDir%\.gimp\gimprc
Find=(INITIALGIMPDATADIRECTORY)
Replace=%PAL:DataDir:DoubleBackslash%

[FileWrite2]
Type=Replace
File=%PAL:DataDir%\.gimp\gimprc
Find=(INITIALPORTABLEAPPSDIRECTORY)
Replace=%PAL:PortableAppsDir:DoubleBackslash%

[FileWrite3]
Type=Replace
File=%PAL:DataDir%\.gimp\gimprc
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir%
Replace=%PAL:Drive%%PAL:PackagePartialDir%

[FileWrite4]
Type=Replace
File=%PAL:DataDir%\.gimp\gimprc
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir:DoubleBackslash%
Replace=%PAL:Drive%%PAL:PackagePartialDir:DoubleBackslash%

[FileWrite5]
Type=Replace
File=%PAL:DataDir%\.gimp\gimprc
Find=%PAL:LastPortableAppsBaseDir%\
Replace=%PAL:PortableAppsBaseDir%\

[FileWrite6]
Type=Replace
File=%PAL:DataDir%\.gimp\gimprc
Find=%PAL:LastPortableAppsBaseDir:DoubleBackslash%\\
Replace=%PAL:PortableAppsBaseDir:DoubleBackslash%\\

[FileWrite7]
Type=Replace
File=%PAL:DataDir%\.gimp\gimprc
Find=%PAL:LastDrive%\\
Replace=%PAL:Drive%\\

[FileWrite8]
Type=Replace
File=%PAL:DataDir%\.gimp\pluginrc
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir:DoubleBackslash%
Replace=%PAL:Drive%%PAL:PackagePartialDir:DoubleBackslash%

[FileWrite9]
Type=Replace
File=%PAL:DataDir%\.gimp\themerc
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir:DoubleBackslash%
Replace=%PAL:Drive%%PAL:PackagePartialDir:DoubleBackslash%

[FileWrite10]
Type=Replace
File=%PAL:DataDir%\.gimp\themerc
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir%
Replace=%PAL:Drive%%PAL:PackagePartialDir%

[FileWrite11]
Type=Replace
File=%PAL:DataDir%\.gimp\themerc
Find=%PAL:LastPortableAppsBaseDir%\
Replace=%PAL:PortableAppsBaseDir%\

[FileWrite12]
Type=Replace
File=%PAL:DataDir%\.gimp\themerc
Find=%PAL:LastPortableAppsBaseDir:DoubleBackslash%\\
Replace=%PAL:PortableAppsBaseDir:DoubleBackslash%\\

[FileWrite13]
Type=INI
File=%PAL:DataDir%\settings\GIMPPortableSettings.ini
Section=GIMPPortableSettings
Key=Language
Value=%PAL:LanguageCustom%

[FileWrite14]
Type=ConfigWrite
File=%PAL:AppDir%\gimp\lib\gimp\2.0\interpreters\pygimp.interp
Entry=python=
Value=%PAL:AppDir%\gimp\bin\pythonw.exe

[FileWrite15]
Type=ConfigWrite
File=%PAL:AppDir%\gimp\lib\gimp\2.0\interpreters\pygimp.interp
Entry=python2=
Value=%PAL:AppDir%\gimp\bin\pythonw.exe

[FileWrite16]
Type=ConfigWrite
File=%PAL:AppDir%\gimp\lib\gimp\2.0\interpreters\pygimp.interp
Entry=/usr/bin/python=
Value=%PAL:AppDir%\gimp\bin\pythonw.exe

[FileWrite17]
Type=Replace
File=%PAL:DataDir%\settings\recently-used.xbel
Find=%20
Replace=" "

[FileWrite18]
Type=Replace
File=%PAL:DataDir%\settings\recently-used.xbel
Find=file:///%PAL:LastDrive%%PAL:LastPackagePartialDir:ForwardSlash%
Replace=file:///%PAL:Drive%%PAL:PackagePartialDir:ForwardSlash%

[FileWrite19]
Type=Replace
File=%PAL:DataDir%\settings\recently-used.xbel
Find=file:///%PAL:LastPortableAppsBaseDir:ForwardSlash%
Replace=file:///%PAL:PortableAppsBaseDir:ForwardSlash%

[FileWrite20]
Type=Replace
File=%PAL:DataDir%\settings\recently-used.xbel
Find=file:///%PAL:LastDrive%
Replace=file:///%PAL:Drive%

Our code hasn't been changing, so it's GIMP itself that some versions worked and some didn't. It changed a bit more with the 64-bit move. I'm working on determining more. I just spent over 2 hours working on this clunky thing and need to move on.

Sometimes, the impossible can become possible, if you're awesome!

lostamiga
Offline
Last seen: 1 month 2 weeks ago
Joined: 2020-04-16 15:12
John,

John,

Thanks so much for your dedication and hard work on this. I know you are very busy with other programs and this isn't a top priority, so I really appreciate it. I would like to help if you want anything from me. It may or may not help, but I just finished downloading most recent GIMP (full version) files from the GIMP download page, and tested them as full installations on my system using Microsoft Sandbox (so I could install each, then wipe the system completely clean just by restarting Sandbox between each install). For each full version installation, I placed the two Resynthesizer 64-bit executable files and the 8 additional python scripts in the C:\Program Files\GIMP 2\lib\gimp\2.0\plug-ins folder. They all worked flawlessly, displaying all 8 additional tools and working just as expected. The versions I tested are:

2.10.12-setup-3.exe
2.10.14-setup.exe
2.10.14-setup-1.exe
2.10.14-setup-2.exe
2.10.14-setup-3.exe
2.10.18-setup.exe
2.10.18-setup-1.exe
2.10.18-setup-2.exe
2.10.20-setup.exe
2.10.20-setup-1.exe
2.10.22-setup.exe

One thing that might not be apparent... Although the scripts and 2 executable files need to be loaded in the C:\Program Files\GIMP 2\lib\gimp\2.0\plug-ins folder for the full version, it is different for GIMP Portable. In the portable version, I have been installing the files to the D:\PortableApps\GIMPPortable\Data\.gimp\plug-ins folder. Using that folder, some of the previous GIMP Portable versions worked like they were supposed to.

Also note, excluding the few previous versions that completely error out, there seems to be some sort of functionality, but it is different, and incomplete. For example, when it partially works, you can call a Resynthesizer filter from the Filters/Map/Resynthesizer menu, but the tool window that opens is different, and that's the ONLY filter related that comes up. In versions (both Portable and the full install version) that work, Resynthesizer not only has a more robust tool window, but it also allows the selection of the 8 additional filters, including Filters/Enhance/Heal Selection and Filters/Enhance/Uncrop.

I really hope I'm not inundating you with too much info. If you can think of anything I can do to assist, please don't hesitate to call on me.

Again, thank you so much for recognizing this bug, and all the work you have done to help resolve it!!

John T. Haller
John T. Haller's picture
Online
Last seen: 35 min 49 sec ago
AdminDeveloperModerator
Joined: 2005-11-28 22:21
Wrong Location? Maybe?

Supported GIMP plugins are supposed to be placed within APPDATA. Unfortunately, GIMP plugins are a mess on Windows and many require installing into Program Files (which you're not supposed to do, security-wise). So you'll get conflicting information depending on who you ask. Really, they should be in C:\Users\USERNAME\AppData\Roaming\GIMP\2.10\plug-ins NOT in C:\Program Files\GIMP 2\lib\gimp\2.0\plug-ins.

So, it appears that if a plugin works properly in C:\Users\USERNAME\AppData\Roaming\GIMP\2.10\plug-ins it should also work properly in its portable equivalent of D:\PortableApps\GIMPPortable\Data\.gimp\plug-ins. If it doesn't, like in the case of abandoned plugins like Resynthesizer, it *might* work if you put it in D:\PortableApps\GIMPPortable\App\gimp\lib\gimp\2.0\plug-ins but I don't honestly know what the rhyme or reason is. Maybe both?

Ultimately, it doesn't matter if it works in local or not. It has to work with a non-installed version using GIMP2_DIRECTORY, HOME, PATH, PYTHONPATH environment variables to point to what it needs. If it doesn't, it's not gonna work.

Sometimes, the impossible can become possible, if you're awesome!

lostamiga
Offline
Last seen: 1 month 2 weeks ago
Joined: 2020-04-16 15:12
Hi John,

Hi John,

First off, Happy Thanksgiving! And, thank you for PortableApps!

About the GIMP bug, I don't know if this is any help or not, but I was tinkering around between the two versions, one where the plug-in works (2.10.14 Portable) and the one where it only partially works (2.10.20 Portable). My goal was to see if I could find anything that might have been different that causes the problem. Remember, I really have no idea what I'm doing programming wise, but may have hit upon something.

I'm hoping this "may" help you solve the issue, and hoping you have time to take a look.

So, with the working (2.10.14) version, I ran Plug-In Browser under the Help menu, and was able to see three tools, the Resynthesizer plug-in itself, and the two Python tools "Heal Selection" and "Heal Transparency" (each with it's own listing).

In the non-working (2.10.20) version, ONLY the Resynthesizer plug-in came up, and NOT the two additional Python scripts which generate additional menu options under Filters/Enhance where they work their magic.

Here are two screenshots. The Resynth shot is the same in both Portable versions, while the Python Heal-Selection (and the Heal Transparency - no screenshot provided) only shows up the working 2.10.14 version.

Scratch that... Just realized that I can't upload photos on this forum...

Here is the heading that is provided for Heal Selection when pulled up in the Plug-In Browser

python-fu-heal-selection
GIMP Plug-In
/Filters/Enhance
Heal the selection from surrounding as if using the heal tool.
Parameters
run-mode INT32 The run mode { RUN-INTERACTIVE (0), RUN-NONINTERACTIVE (1) }
image IMAGE Input image
drawable DRAWABLE Input drawable
samplingRadiusParam INT32 Sample from:
orderParam INT32 Filling order:
Addditional Information
Requires separate resynthesizer plugin.
Author: Lloyd Konneker
Date: 2009
Copyright: 2009 Lloyd Konneker

I was really wanting to attach the screenshots, with the hope that the missing Heal-Selection Python script in 2.10.20 might give you a clue as to what is going wrong.

Anyway, I really appreciate all you have done to try and fix this, and if you are bored, hopefully this will help you continue.

Thank again for everything!

Log in or register to post comments