Converting problem using ImageMagick 6.3.2

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
sanojmn

Converting problem using ImageMagick 6.3.2

Post by sanojmn »

Hi,

I have installed ImageMagick 6.3.2 in our Fedora 7 System.

What my problem is ImageMagick is not converting some of the pdf of I am having. I am getting blank output means in white. This is happening in our online system. Local we have another Fedora 9 system. In that it is working fine and version of ImageMagick is latest of that local machine. I dont know it is because of that. We have used "yum install ImageMagick" to install in both online and local server. In local server (Fedora 9 ImageMagick 6.3.7) output is getting correctly, same as input. Here you can see the input and output files below:

We are converting pdf to png.

Input File :Image

Output File: Image

Please give a solution for this.

Thanks,
Sanoj
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Converting problem using ImageMagick 6.3.2

Post by magick »

Try
  • convert -colorspace RGB image.pdf image.pdf
If that fails, post a URL to your image so we can download it and reproduce the problem.
sanojmn

Re: Converting problem using ImageMagick 6.3.2

Post by sanojmn »

magick wrote:Try
  • convert -colorspace RGB image.pdf image.pdf
If that fails, post a URL to your image so we can download it and reproduce the problem.

Hi,

I tried with that command above but i got this error

ERROR: /typecheck in --get--
Operand stack:
--dict:8/8(L)-- 1 --dict:8/8(L)-- 1 Rect
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop --nostringval-- --nostringval-- 2 1 10 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval--
Dictionary stack:
--dict:1125/1686(ro)(G)-- --dict:0/20(G)-- --dict:107/200(L)-- --dict:107/200(L)-- --dict:104/127(ro)(G)-- --dict:241/347(ro)(G)-- --dict:20/24(L)-- --dict:4/6(L)-- --dict:21/32(L)-- --dict:19/21(L)--
Current allocation mode is local
ESP Ghostscript 815.04: Unrecoverable error, exit code 1
convert: Postscript delegate failed `chetan1.pdf': No such file or directory.
convert: missing an image filename `test.png'.

Please give solution
Sanoj
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Converting problem using ImageMagick 6.3.2

Post by magick »

ImageMagick relies on Ghostscript to render PDF and Ghostscript is throwing an exception for the PDF. You can see the command ImageMagick uses by adding -verbose to the command line:
  • convert -verbose -colorspace RGB image.pdf image.png
You may need to upgrade your release of Ghostscript. The current GPL release of Ghostscript is 8.63.
sanojmn

Re: Converting problem using ImageMagick 6.3.2

Post by sanojmn »

magick wrote:ImageMagick relies on Ghostscript to render PDF and Ghostscript is throwing an exception for the PDF. You can see the command ImageMagick uses by adding -verbose to the command line:
  • convert -verbose -colorspace RGB image.pdf image.png
You may need to upgrade your release of Ghostscript. The current GPL release of Ghostscript is 8.63.

I have installed the new version of Ghostscript (8.63) but Getting the same error:

convert -verbose -colorspace RGB chetan1.pdf test.png
"gs" -q -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=0 "-sDEVICE=pnmraw" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" "-sOutputFile=/tmp/magick-XXOXqP8W" "-f/tmp/magick-XXwbyZ3X" "-f/tmp/magick-XXEbplZY"
Error: /typecheck in --run--
Operand stack:
--nostringval-- --dict:8/8(L)-- 1 --dict:8/8(L)-- 1 Rect
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1905 1 3 %oparray_pop 1904 1 3 %oparray_pop 1888 1 3 %oparray_pop --nostringval-- --nostringval-- 2 1 10 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval--
Dictionary stack:
--dict:1153/1684(ro)(G)-- --dict:1/20(G)-- --dict:75/200(L)-- --dict:75/200(L)-- --dict:106/127(ro)(G)-- --dict:275/300(ro)(G)-- --dict:22/25(L)-- --dict:4/6(L)-- --dict:22/40(L)-- --dict:20/23(L)--
Current allocation mode is local
GPL Ghostscript 8.63: Unrecoverable error, exit code 1
convert: Postscript delegate failed `chetan1.pdf': No such file or directory.
convert: missing an image filename `test.png'.


You can reproduce the error with this pdf below:



Sanoj
Last edited by sanojmn on 2009-03-19T03:27:44-07:00, edited 1 time in total.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Converting problem using ImageMagick 6.3.2

Post by magick »

The problem is in your PDF file or in Ghostscript, not ImageMagick. Using Ghostscript directly on your PDF produces the same exception:
  • -> gs chetan1.pdf
    GPL Ghostscript 8.60 (2007-08-01)
    Copyright (C) 2007 Artifex Software, Inc. All rights reserved.
    This software comes with NO WARRANTY: see the file PUBLIC for details.
    Processing pages 1 through 10.
    Page 1
    Error: /typecheck in --run--
    Operand stack:
    --dict:8/8(L)-- 1 --dict:8/8(L)-- 1 Rect
    Execution stack:
    %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1889 1 3 %oparray_pop 1888 1 3 %oparray_pop 1872 1 3 %oparray_pop --nostringval-- --nostringval-- 2 1 10 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval--
    Dictionary stack:
    --dict:1142/1684(ro)(G)-- --dict:2/20(G)-- --dict:75/200(L)-- --dict:75/200(L)-- --dict:106/127(ro)(G)-- --dict:274/300(ro)(G)-- --dict:21/25(L)-- --dict:4/6(L)-- --dict:21/40(L)-- --dict:19/23(L)--
    Current allocation mode is local
    GPL Ghostscript 8.60: Unrecoverable error, exit code 1
Post Reply