convert multi page ps to png

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
markp
Posts: 2
Joined: 2013-02-11T07:20:30-07:00
Authentication code: 6789

convert multi page ps to png

Post by markp »

Hello,

Here are my system specs:
Manufacture and model - Dell PowerEdge 2950
CPU - dual Intel Xeon x5450 3.0GHz (8 CPU threads)
RAM - 16GB
disks - 1x80GB and 3x1TB
OS - Redhat Enterprise Linux 5.8 x86_64
Running ImageMajick 6.2.6

I'm having a problem converting a multi page postscript file to png formats. The following command is issued under linux using
convert myfile.ps myfile.png<return>

Command converts only 15 of the 30 pages it finds in myfile.ps.

I've tried:
Using gs to split my ps file into single page files which did not work
prompt>gs -sOutputFile=myfile%d.ps -sDEVICE=png16
prompt>gs -sOutputFile=plotchi%d.ps plotchi.ps

converting to pdf using ps2pdf which worked but only put 15 images of the 30 into the pdf file (so same problem different program)
prompt>ps2pdf plotchi.ps plotchi.pdf

So there's some kind of inherent limitation in gs (which as I understand it underlies imageMagick programs.

So to reiterate. I'd like to convert my ps file into png format. The command I used is only producing the first 15 pages of my ps file. Any ideas?

Thank you for your consideration,
markp
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: convert multi page ps to png

Post by snibgo »

Have you tried something like:

Code: Select all

convert myfile.ps[0-14] myfile.png
convert myfile.ps[15] myfile.png
convert myfile.ps[16-29] myfile.png
What does ...

Code: Select all

identify myfile.ps
... say? With and without verbose?

Edit to add: gosh, that's an ancient version of IM! Perhaps your Ghostscript is also antiquated?
snibgo's IM pages: im.snibgo.com
markp
Posts: 2
Joined: 2013-02-11T07:20:30-07:00
Authentication code: 6789

Re: convert multi page ps to png

Post by markp »

Thank you very much, that worked well. However, under bash you have to single quote the parameters with [#-#], otherwise the shell interprets them it as a file wildcard.

Thank you for your consideration,
markp
Post Reply