A versatile script for converting EPS files to various image formats using Ghostscript.
- Download Ghostscript from Ghostscript downloads page.
- Install Ghostscript, and note the installation directory.
- Add Ghostscript to your system's PATH:
- Right-click on 'This PC' or 'My Computer'.
- Click 'Properties' -> 'Advanced system settings'.
- Click 'Environment Variables'.
- Under 'System variables', find and select 'PATH', then click 'Edit'.
- Click 'New' and add the path to the Ghostscript
bin
folder (e.g.,C:\Program Files\gs\gs10.02.1\bin
). - Click 'OK' to close all dialogs.
Typically, you can install Ghostscript using your distribution's package manager, for example:
- On
Ubuntu
or otherDebian
based systems, use the following command to install Ghostscript:
sudo apt-get install ghostscript
- On
CentOS
or otherRed Hat
based systems, use the following command to install Ghostscript:
sudo yum install ghostscript
Alternatively, you can download the latest version of Ghostscript from the official GitHub releases page.
Clone the repository or download the script file directly from the GitHub repository.
- To clone the
epsConverter
repository, use:
git clone https://github.com/Enthusiasm23/epsConverter.git
- Alternatively, to directly download the
eps_converter.py
, use:
wget https://raw.githubusercontent.com/Enthusiasm23/epsConverter/master/eps_converter.py
Run the script from the command line, specifying the input EPS file, the output file with its desired format, and optionally the resolution and Ghostscript device type.
python eps_converter.py input.eps output.png -r 300 -d png
Alternatively, you can use Ghostscript directly for more complex operations.
gs -dNOPAUSE -dBATCH -sDEVICE=jpeg -r300 -sOutputFile=output.jpg input.eps
For more detailed usage and parameter adjustments, please refer to the Ghostscript documentation.
This repository's script is a Python implementation of some functionalities provided by Ghostscript. It serves as a convenient interface, simplifying certain operations that Ghostscript enables. We express our heartfelt gratitude to Ghostscript for their robust and versatile software, which has been instrumental in the development of this script. Their work and dedication to the open-source community are greatly appreciated.
epsConverter is licensed under the MIT License - see the LICENSE file for details.