Re: system command - ImageMagick convert

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Mon Apr 15 2013 - 17:31:28 MDT

Hi Andy,
Try deleting the workstation with a delete(wks) before you call the
system command. In one of the last releases (I don't remember which)
some internal coding was altered so that you now must manually delete
the workstation before manipulating the workstation output.

If that doesn't fix the issue let ncl-talk know..
Adam

On 4/15/13 5:24 PM, Andrew Penny wrote:
> Hi there,
>
> I'm trying to convert an image from pdf to gif format
> with ImageMagick's "convert" from within NCL using the "system"
> command. However, when I attempt this I get what looks to be a
> ghostscript error (I'm not sure exactly of the error source). When I
> try the command outside of NCL, everything works properly and I'm able
> to convert the image just fine. Interestingly, when I switch to an
> older version of NCL (6.0.0), everything works just fine too. Any
> ideas on what might be causing this behavior with the "system" command
> in newer versions of NCL (v. 6.1.2)??
>
> The error I get when trying to convert the image from within the NCL
> script is:
>
> **** Error: Cannot find a 'startxref' anywhere in the file.
> **** Warning: An error occurred while reading an XREF table.
> **** The file has been damaged. This may have been caused
> **** by a problem while converting or transfering the file.
> **** Ghostscript will attempt to recover the data.
> **** Error: Trailer is not found.
> Error: /stackunderflow in --run--
> Operand stack:
> --nostringval--
> Execution stack:
> %interp_exit .runexec2 --nostringval-- --nostringval--
> --nostringval-- 2 %stopped_push --nostringval-- --nostringval--
> --nostringval-- false 1 %stopped_push 1910 1 3
> %oparray_pop 1909 1 3 %oparray_pop 1893 1 3
> %oparray_pop --nostringval-- --nostringval-- --nostringval--
> --nostringval-- --nostringval--
> Dictionary stack:
> --dict:1172/1684(ro)(G)-- --dict:1/20(G)-- --dict:82/200(L)--
> --dict:82/200(L)-- --dict:109/127(ro)(G)-- --dict:293/300(ro)(G)--
> --dict:21/31(L)--
> Current allocation mode is local
> GPL Ghostscript 9.06: Unrecoverable error, exit code 1
> convert: Postscript delegate failed
> `/Users/abpenny/storms/tcs25_28/graphics/ctt_slp/tcs25_28_d01-ctt_slp_2008-08-28-00_00.pdf':
> No such file or directory @ error/pdf.c/ReadPDFImage/678.
> convert: no images defined
> `/Users/abpenny/storms/tcs25_28/graphics/ctt_slp/tcs25_28_d01-ctt_slp_2008-08-28-00_00.gif'
> @ error/convert.c/ConvertImageCommand/3078.
>
> Thanks,
> Andy
>
>
> Andrew Penny
> Research Associate - Meteorology Department
> Naval Postgraduate School
> Monterey, CA 93943
> Phone: (831) 656-3101
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Apr 15 17:31:38 2013

This archive was generated by hypermail 2.1.8 : Mon Apr 15 2013 - 20:12:25 MDT