Page 1 of 1

converting PS file with 1000 pages to png takes more time

Posted: 2014-08-22T06:05:53-07:00
by Ganesha
Hi,
I tried converting a book (.ps) containing 737pages using convert command
it takes more time and also I am getting duplicates of the pages of book in png. Can help me in converting the pages correctly and also in less time.
I use the command

Code: Select all

convert testing.ps test.png
Here is the file : https://www.dropbox.com/s/9ai5t7ctwe79a0e/testing.ps

Re: converting PS file with 1000 pages to png takes more tim

Posted: 2014-08-22T07:24:02-07:00
by snibgo
Each page is 680x800 pixels. There are 737 pages. If you are using Q16, this is 8 bytes/pixel, so takes 3.5 GB of memory. If you don't have that much free, it will use disk, which will be slow.

Q8 will use half that memory.

You could convert in batches, say 100 pages at a time.

Re: converting PS file with 1000 pages to png takes more tim

Posted: 2014-08-24T22:39:47-07:00
by Ganesha
Thanks for the reply . Is there any command in convert to get the count of the pages in ps files?

Re: converting PS file with 1000 pages to png takes more tim

Posted: 2014-08-24T23:14:31-07:00
by snibgo
identify -ping -format %n testing.ps

Re: converting PS file with 1000 pages to png takes more tim

Posted: 2014-08-25T05:27:20-07:00
by Ganesha
Hi,
I tried this command

Code: Select all

convert testing.ps[0-99] test.png
convert testing.ps[100-199] test.png
convert testing.ps[200-299] test.png
convert testing.ps[300-399] test.png
convert testing.ps[400-499] test.png
convert testing.ps[500-599] test.png
convert testing.ps[600-699] test.png
convert testing.ps[700-736] test.png 
as you suggested to convert in batches of 100 pages but at result I am getting the first hundred pages for all the batch . Help me in avoid duplicates also suggest to reduce the time taken.

Re: converting PS file with 1000 pages to png takes more tim

Posted: 2014-08-25T09:36:37-07:00
by fmw42
as you suggested to convert in batches of 100 pages but at result I am getting the first hundred pages for all the batch . Help me in avoid duplicates also suggest to reduce the time taken.
The numbering of the output images will be the same 0-99, but look carefully at the images. They should be different.

try

Code: Select all

convert testing.ps[0-99] -scene 0 test.png
convert testing.ps[100-199] -scene 100 test.png
etc

Re: converting PS file with 1000 pages to png takes more tim

Posted: 2014-08-26T01:06:37-07:00
by Ganesha
Hi,

Code: Select all

convert testing.ps[0-99] test.png
convert testing.ps[100-199] test.png
convert testing.ps[200-299] test.png
convert testing.ps[300-399] test.png
convert testing.ps[400-499] test.png
convert testing.ps[500-599] test.png
convert testing.ps[600-699] test.png
convert testing.ps[700-736] test.png
Let me explain clearly .. after conversion of the images using the above code. I am getting outputs like test-0.png,test-1.png,test-2.png....etc upto test-736.png. The issue I am facing is test-0.png , test-100.png ,test-200.png,test-300.png....test-700.png images resembles the same. Similarly test-1.png , test-101.png ,test-201.png,test-301.png....test-701.png , test-2.png , test-102.png ,test-202.png,test-302.png....test-702.png and so on resembles the same. Help in fixing this issue.

Re: converting PS file with 1000 pages to png takes more tim

Posted: 2014-09-04T03:22:13-07:00
by Ganesha
hello any update on this?

Re: converting PS file with 1000 pages to png takes more tim

Posted: 2014-09-04T09:33:41-07:00
by fmw42
What version of IM and platform are you using? If an old version of IM, perhaps there was a bug and you should upgrade. Also what version of Ghostscript are you using? If that is old, perhaps you should upgrade that as well, since IM relies upon GS to process ps files.

Can you post a link to a ps file with fewer pages?

What happens if you test only the first 3 or 4 groups of 10 pages? Do you get the same kind of result?

Re: converting PS file with 1000 pages to png takes more tim

Posted: 2014-09-10T03:23:11-07:00
by Ganesha
Am currently using latest version of Imagemagick (6.8.9-7) and Ghostscript (9.14). And system I use is MAC. I can't perform above action even after the updating, same outputs are listing. Kindly provide me a solution.I get the same kind of results ..

Re: converting PS file with 1000 pages to png takes more tim

Posted: 2014-09-10T10:00:54-07:00
by fmw42
IM 6.8.9.7 Q16 Mac OSX
Ghostscript 9.10
libpng 1.6.12_0

I can confirm this appears to be a bug.


I took a multipage PDF and did the same kind of test and it worked fine. But when I converted the file to a multipage PS, I got repeated sets of the first six pages. I then converted the PS back to PDF and repeated and it worked fine again.

This worked:

Code: Select all

convert IDIMS_Training2.pdf[0-5] test.png
convert IDIMS_Training2.pdf[6-12] test.png
This failed:

Code: Select all

convert IDIMS_Training2.ps[0-5] test.png
convert IDIMS_Training2.ps[6-12] test.png

This failed:

Code: Select all

convert IDIMS_Training2.ps[0-5] -scene 0 test.png
convert IDIMS_Training2.ps[6-12] -scene 6 test.png

Work around: Convert the PS file to PDF first and then do the same thing to separate files.

P.S. I had no problems with

Code: Select all

convert IDIMS_Training2.ps test.png
and got all 57 distinct pages