Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Converting python plugin-in shellout.py from gimp 2.x to 3.x
#59
(05-28-2025, 07:55 AM)duke2362 Wrote: Hi iiey,

The real problem is that when you launch the Nik plugin on MacOs, you go straight back to the script (unlike on Windows).

So I tested this solution:

Code:
# Run the external program
       if sys.platform == "darwin":
           prog_caller = ["open", "--wait-app", "-a"] #"--wait-app" blocks until the used applications are closed
       

And it seems to work for me. If anyone can test on a Mac... Smile

Hi duke2362,

You are right about the behavior, gimp should wait there until nik program finishes before importing the image back.
But I'm not sure whether the "--wait-app" option really exists for "open" command of mac osx, it should be "-W" actually. Maybe it differ from version to version, which macOS do you use?
https://ss64.com/mac/open.html
https://www.unix.com/man_page/osx/1/open/


My other question is, could you check where the HDR Efex Pro 2 saves your images after processing? If the location is not ~/Documents/ as nikplugin.py assumes then it may not work for you with this plugin.

(05-28-2025, 12:11 AM)alderon Wrote: Hi all,

  I made nikplugin.py  version 3.20 work on my PC, but one thing I wish to change. Instead of export in jpg, is it possible to change it to tif?

           temp_path = os.path.join(tempfile.gettempdir(), f"tmpNik_{i}.jpg")
           temp_files.append(temp_path)

          changing here from tmpNik_{i}.jpg to tmpNik_{i}.tif kind of works. It will import TIF into Nik Collection program, I can save it as TIF there, but when Gimp import that file back, it's really tiny, like thumbnail. I have no idea, how to fix that.


Thanks.

Hi alderon,
I wonder what didn't work for you at first for you on PC and what did you modify to make it functional in your case?
So it could others if they have the same issue.

I could not recall which one of the Nik Collection didn't work with .tif but all of them can save as .jpg so I just simplified the code.
Actually, it's the correct way you did to replace the workflow with tif. I will check when I have time whether your problem can be reproduced.
Reply


Messages In This Thread
RE: Converting python plugin-in shellout.py from gimp 2.x to 3.x - by iiey - 05-28-2025, 10:07 PM

Forum Jump: