Last updated on July 4, 2020 by Dan Nanni
If you want to convert a PostScript (PS) or an Encapsulated PostScript (EPS) file into JPG format on Linux, you can use ghostscript
.
To install ghostscript
on Ubuntu or Debian:
$ sudo apt-get install ghostscript
To install ghostscript
on CentOS, RHEL or Fedora:
$ sudo yum install ghostscript
To convert PS or EPS file to JPG format using ghostscript
, run the following command.
$ gs -sDEVICE=jpeg -dJPEGQ=100 -dNOPAUSE -dBATCH -dSAFER -r300 -sOutputFile=output.jpg input.eps
If you want to resize or rotate the generated a JPG image file, you can use ImageMagick
. A command-line utility called mogrify
contained in ImageMagick
package can do necessary image transformation.
To install ImageMagick
on Ubuntu or Debian:
$ sudo apt-get install imagemagick
To install ImageMagick
on CentOS, RHEL or Fedora:
$ sudo yum install ImageMagick
Once ImageMagick
is installed, run mogrify
command to resize and rotate an image.
$ mogrify -trim -resize 800x600 -rotate 90 myfile.jpg
This website is made possible by minimal ads and your gracious donation via PayPal or credit card
Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.
Xmodulo © 2021 ‒ About ‒ Write for Us ‒ Feed ‒ Powered by DigitalOcean