Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Most functionality does not appear in GIMP 2.10.30 on Ubuntu 22.04.1 #117

Open
hyperlogos opened this issue Dec 13, 2022 · 16 comments
Open

Comments

@hyperlogos
Copy link

Is it possible to do the same thing as "Enhance>Heal selection" with "Map>Resynthesize"? I don't have RAM to waste on flatpaks

@robbak
Copy link

robbak commented Apr 19, 2023

This is because all the helper scripts are written in Python version 2, which pretty much all distros have removed, as it is old and abandoned by the Python team.

The next version of Gimp supports python 3, and work has been done to rewrite the helper scripts, but it is really waiting on the Gimp team to get gimp3 into a usable condition.

@samontab
Copy link

samontab commented Aug 7, 2023

@hyperlogos yes, it is possible. You only need a script that uses the resynthesizer plug-in. @robbak is right in explaining why it doesn't currently work.

The good news is that @itr-tert made a TinyScheme (aka script-fu) version of the Heal Selection script(and the other scripts as well), so you can use that right now.

Simply copy this script into your scripts folder, and restart GIMP (or go to Filters->Script Fu->Refresh Scripts) and you should now see Filters->Enhance->Heal Selection(scm). You can of course also add all the scripts if you prefer.

You can check where your scripts folders are located from Edit->Preferences->Folders->Scripts

@RogerWhyte
Copy link

Hi dear experts
running the script "heal selection" ends up in error messages:

left image undo in inconsistent state, closing open undo groups
and
Error: eval: unbound variable plug-in-resynthesizer

My system: Mint 21.3 based on ubunto 22.04 and GIMP 2.10.30
What can be the cause?

@itr-tert
Copy link

Hi @RogerWhyte, I assume from your error message that this is a TinyScheme version question.

'plug-in-resynthesizer' is provided by the binary executable file 'resynthesizer'.
The file must exist in one of the plug-ins folders.
(e.g. /usr/lib/gimp/2.0/plug-ins/resynthesizer
~/.config/GIMP/2.10/plug-ins/resynthesizer
/usr/local/lib/gimp/2.0/plug-ins/resynthesizer )
Or check your GIMP settings. Edit -> Preferences -> Folders -> Plug-ins

If the file exists, there may be a problem with the executable file itself. For example, compatibility.
Which method did you use to install resynthesizer-scm?

// By the way, the python2 version of the executable file 'resynthesizer' should also work.

@RogerWhyte
Copy link

I recently upgraded Linux Mint from 20.3 to 21.3 where GIMP 2.10.30 comes without python2 support and with missing plugins.
The resynthesizer plug-in was not in one of the folders.
So I looked for a solution and found ResynthesizerPlugin-Gimp-2.10-osx.tgz
I installed the contained files in ~/.config/GIMP/2.10/plug-ins/ and marked them as executable.
Phyton2 is available on the computer. I even made phyton2 as the preferred Phyton version.
But unfortunately there was no success. The missed plugin is not shown in the GIMP effects list.
The script discussed here looked like a workaround but ends up in errors.
How should I proceed?

@bootchk
Copy link
Owner

bootchk commented Jan 28, 2024

Is that for MacOS? I don't understand why "osx" is in the name. If so, that's why it doesn't work.

Forgive me, but the dropping of python2 from most distributions has been a nightmare for me.

There is another github repo that has ported the resynthesizer python scripts to ScriptFu i.e. Scheme.
So that it works no matter what Python the distribution supports.
I hope to get you that link soon, and update the wiki to point to that github repo.
(Also, there is a branch on this repo, branch "resynthesizer3" that has the same Scheme scripts
and is ready for GIMP v3 and would probably work. But it is not really ready for release.)

Also, does Mint support flatpak? If so, then GIMP and resynthesizer are both flatpaks.

@RogerWhyte
Copy link

Maybe I selected to wrong archive.
I downloaded linux-resynth-2.03.zip and installed the files in ~/.config/GIMP/2.10/plug-ins/
Now the script works successfully !
But I do not understand why the function does not work as a regular plug-in.

Thank you for your expertise and support.
Kind regards, Roger

@bootchk
Copy link
Owner

bootchk commented Jan 29, 2024

But I do not understand why the function does not work as a regular plug-in.

I don't understand what you mean, please clarify.

@itr-tert
Copy link

I too would like to know what your question is.

@RogerWhyte
Copy link

My understanding was that the plug-in should work as soon as the files from linux-resynth-2.03.zip are stored in the user .config/gimp folder. But it doesn't. Only with the additional script the function is available in GIMP. I am now happy with this but why is the script necessary?

@itr-tert
Copy link

I'm not sure what your exact question is because it looks to me like you just placed the files from linux-resynth-2.03.zip.

A set of files called resynthesizer consists of a core-resynthesizer and python2 scripts (or script-fu scripts) that calls core.
core-resynthesizer provides an internal functionality called plug-in-resynthesizer.
core-resynthesizer has no GUI or dialog.
core-resynthesizer is the executable file 'resynthesizer' created using C language.(It has the same name as the project name and is difficult to distinguish.)

'heal selection' is one of the functions that is an application of core-resynthesizer.
'heal transparency', 'Texture', 'Uncrop', 'Style', etc... are functions that are applications of core-resynthesizer.
These are provided by each scripts.
Each script does some preprocessing to pass information to the core-resynthesizer.

This is why the plugin functionality is not provided in just one file.
(@samontab writes comments assuming that core-resynthesizer is installed.)

@RogerWhyte
Copy link

Can you give me a download link to get the full set of files?

@itr-tert
Copy link

I was going to recommend using the .deb package here.
https://github.com/itr-tert/gimp-resynthesizer-scm-download

# install depends
sudo apt install libx11-6 libxau6 libxcomposite1 libatk1.0-0 libbabl-0.1-0 libblkid1 libbrotli1 libbsd0 libc6 libcairo2 libdatrie1 libexiv2-27 libexpat1 libffi8 libfontconfig1 libfreetype6 libfribidi0 libgcc-s1 libgdk-pixbuf-2.0-0 libgegl-0.4-0 libgexiv2-2 libgimp2.0 libglib2.0-0 libgraphite2-3 libgtk2.0-0 libgtk3-nocsd0 libharfbuzz0b libjpeg-turbo8 liblcms2-2 libmd0 libmount1 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpcre2-8-0 libpcre3 libpixman-1-0 libpng16-16 libselinux1 libthai0 libuuid1 libxcb-render0 libxcb-shm0 libxcb1 libxcursor1 libxdamage1 libxdmcp6 libxext6 libxfixes3 libxi6 libxinerama1 libxrandr2 libxrender1 zlib1g
# download
wget https://github.com/itr-tert/gimp-resynthesizer-scm-download/raw/main/gimp-resynthesizer-scm.deb
# install
sudo dpkg -i gimp-resynthesizer-scm.deb

It probably works on Mint OS(based on Ubuntu 22.04) as well.

If your CPU type is different, shared libraries are different, your OS is different or doesn't work for other reasons you will need to build it yourself.

git clone https://github.com/itr-tert/gimp-resynthesizer-scm/
cd gimp-resynthesizer-scm
./autogen.sh && make && sudo make install

These steps will install the necessary files for 'heal selection'.

@RogerWhyte
Copy link

Installed the script package and the full number of scripts is available in GIMP
Thanks for your support

@itr-tert
Copy link

that is good.
(I will improve the error message of resynthesizer-scm.)

@CryptorClub
Copy link

This appimage helped to run python-2 scripts on my Ubuntu 22 (Worked with GIMP version installed with apt-get, but not snap).
Scripts need to copy ~/.config/GIMP/2.10/plug-ins/
https://github.com/TasMania17/Gimp-Appimages-Made-From-Debs/releases/tag/Gimp-Python2-AppImage-Launchers-for-Linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants