Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ghostscript integration
#1
Hi, I'm trying to integrate Ghostscript with GIMP in order to open .eps files. I'm not a coder and very much a beginner. I recently upgraded to Mac OS Sequoia 15.3. I installed GIMP 2.10.38. I'm pretty sure I successfully installed ghostscript using Homebrew. However, when I try to open an eps file. I get the following errors. Opening '/true' failed: Error opening file /true: No such file or directory.

Also I get: Opening 'file...' failed: could not interpret PostScript file '/file'.

It's my understanding that ghostscript should be able to allow gimp to open the file. Would someone know what's the missing step to integrate ghostscript with gimp?
Reply
#2
In the installation tree, you should find a n executable in lib/gimp/2.0/plug-ins/file-ps/file-ps (could have an extension if OSX requires it).

If you use ldd lib/gimp/2.0/plug-ins/file-ps/file-ps it will list everything that the plug-in requires to run (and where it finds it).

Now, if you are missing a library you get a more ominous message: Plug-in crashed: "file-ps"
(/path/to/your/lib/gimp/2.0/plug-ins/file-ps/file-ps)
as I just experienced (installed GS version incompatible with the one my Gimp was compiled for).

Given your error message the GS code runs but doesn't understand the file contents, so IMHO your problem is not with your GS installation but with the EPS file. Can you attach it here? Did you try to open other files?
Reply
#3
It could be the eps file. I do have a few that open with Gimp 2.10.38 in linux kubuntu 24.04 as this example.

   

As well as Ofnuts suggestions what shows running ghostscript in a terminal?
Reply
#4
(02-08-2025, 09:05 PM)Ofnuts Wrote: In the installation tree, you should find a n executable in  lib/gimp/2.0/plug-ins/file-ps/file-ps (could have an extension if OSX requires it).

If you use ldd lib/gimp/2.0/plug-ins/file-ps/file-ps it will list everything that the plug-in requires to run (and where it finds it).

Now, if you are missing a library you get a more ominous message: Plug-in crashed: "file-ps"
(/path/to/your/lib/gimp/2.0/plug-ins/file-ps/file-ps)
as I just experienced (installed GS version incompatible with the one my Gimp was compiled for).

Given your error message the GS code runs but doesn't understand the file contents,  so IMHO your problem is not with your GS installation but with the EPS file. Can you attach it here? Did you try to open other files?


I found the executable file, but since I don't have linux i'm not sure what the terminal command would be for what the plug in requires to run. I tried two files, neither opened. The eps file is too large to open but it's a stock image from iStock.

(02-08-2025, 09:25 PM)rich2005 Wrote: It could be the eps file. I do have a few that open with Gimp 2.10.38 in linux kubuntu 24.04 as this example.



As well as Ofnuts suggestions what shows running ghostscript in a terminal?

I get this message in terminal:

~ % gs
GPL Ghostscript 10.04.0 (2024-09-18)
Copyright © 2024 Artifex Software, Inc.  All rights reserved.
This software is supplied under the GNU AGPLv3 and comes with NO WARRANTY:
see the file COPYING for details.
Reply
#5
(Yesterday, 01:38 AM)Leon Wrote: I get this message in terminal:

~ % gs
GPL Ghostscript 10.04.0 (2024-09-18)

....I tried two files, neither opened. The eps file is too large to open but it's a stock image from iStock.

Well, you see gs, it so Gimp should see it, back to

incompatible version of ghostscript
------------------
EDIT: Different laptop this morning and this has GPL Ghostscript 10.02.1 (2023-11-01)
seems to work ok Gimp 2.10.38 (from PPA)
--------------
or
Quote:I tried two files, neither opened. The eps file is too large to open but it's a stock image from iStock.
problem with the image files ? Will they open with any other application ?

EDIT: just trying to eliminate things. Will one of the .eps files convert using gs in a terminal
Code:
gs -dSAFER -dBATCH -dNOPAUSE -dEPSCrop -sDEVICE=png16m -r600 -sOutputFile=out.png input.eps
This the largest eps I have handy, about 2 MB .eps file As a png opened in a file viewer. -r is pixels-per-inch you might want a smaller value.

   
Reply
#6
(Yesterday, 09:18 AM)rich2005 Wrote:
(Yesterday, 01:38 AM)Leon Wrote: I get this message in terminal:

~ % gs
GPL Ghostscript 10.04.0 (2024-09-18)

....I tried two files, neither opened. The eps file is too large to open but it's a stock image from iStock.

Well, you see gs, it so Gimp should see it, back to

incompatible version of ghostscript
------------------
EDIT: Different laptop this morning and this has  GPL Ghostscript 10.02.1 (2023-11-01)
seems to work ok  Gimp 2.10.38 (from PPA)
--------------
or
Quote:I tried two files, neither opened. The eps file is too large to open but it's a stock image from iStock.
problem with the image files ? Will they open with any other application ?

EDIT: just trying to eliminate things. Will one of the .eps files convert using gs in a terminal
Code:
gs -dSAFER -dBATCH -dNOPAUSE -dEPSCrop -sDEVICE=png16m -r600 -sOutputFile=out.png input.eps
This the largest eps I have handy, about 2 MB .eps file  As a png opened in a file viewer.     -r is pixels-per-inch you might want a smaller value.

I don't think it was able to. Here's what I got:

gs -dSAFER -dBATCH -dNOPAUSE -dEPSCrop -sDEVICE=png16m -r600 -sOutputFile=out.png iStock-1304754928.eps
GPL Ghostscript 10.04.0 (2024-09-18)
Copyright © 2024 Artifex Software, Inc.  All rights reserved.
This software is supplied under the GNU AGPLv3 and comes with NO WARRANTY:
see the file COPYING for details.
Error: /undefinedfilename in (iStock-1304754928.eps)
Operand stack:

Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push
Dictionary stack:
   --dict:746/1123(ro)(G)--   --dict:0/20(G)--   --dict:85/200(L)--
Current allocation mode is local
Last OS error: No such file or directory



I was able to open the file with Inkscape.
Reply
#7
The first thing to do is to download the Ghostscript file.

After downloading it, do not run it! (Do not run the gs925w64.exe file or whatever the version you downloaded is).

Unzip this .exe file with 7-zip (right-click on the file name and select and extract to GS 952w-64) - It will unzip inside the folder where the downloaded executable file is located).

Then you will now have the downloaded .exe file and the new unzipped folder with the same name.
Inside this folder will be the Ghostscript files.
So in the bin folder, you rename it to gs.

Now you go back to the previous folder and enter the lib folder. Select all the files inside this folder (lib).
Go back to the gs folder and paste all the contents inside it.
Now you will copy the gs folder to the root of your system drive C:

Now you need to change the Windows environment variables.
To do this, you can type 'environment' in the Windows search box and you will find the option to edit the system environment variables.

Click on this option, which will open the System Properties window.
Then go to the Environment Variables option and click on it.

Another window will appear, the Environment Variables window. 
Then, at the bottom, where System Variables is, look for the Path variable.
Select this variable and click on edit.
Then you will create a new path and you will then enter the path of the gs folder that is in the Root C:, which is where you pasted the gs folder.
Now you should be able to open .eps files in GIMP and Inkscape.
   
Good luck.


I'm sorry, it was only after I wrote this whole text that I realized that you use Mac and not Windows.  Blush

Anyway, I think that if any Windows user has the same question in the future, they might find this text useful.
                               .....
Samj PortableGimp 2.10.28 - Win-10 /64.
Reply
#8
@Leon

[/quote] .....Error: /undefinedfilename in (iStock-1304754928.eps)[/quote]

A common cause of that is either not providing the full path to the file (if not running the command in the folder containing the file) or the ghostscript installation is defective

...but since Inkscape works then looks like Gimp is not seeing the ghostscript files. Not sure what you can do about that in a MacOS. It might be a security thing.
Reply


Forum Jump: