【发布时间】:2018-12-05 05:14:08
【问题描述】:
最近升级到 imagemagick 7.0.8-14 并且无法将 pptx 文件转换为 jpg(或任何其他文件格式)。是升级前的工作版本。下面是运行转换 cmd 的输出。发生在所有针对它运行的 pptx 上。
imagemagick version: 7.0.8-14
ghostscript version: 9.07
centos 7
$ convert test.pptx[0] -thumbnail 650x650 -gravity center -extent 1500x1000 s1.jpg
\convert /tmp/magick-17292VzAbA_mfaxJX -> /tmp/magick-17292VzAbA_mfaxJX.pdf using filter : impress_pdf_Export
convert: PDFDelegateFailed `[ghostscript library 9.07] -sstdout=%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 '-sDEVICE=pngalpha' -dTextAlphaBits=4 -dGraphicsAlphaBits=4 '-r72x72' -dFirstPage=1 -dLastPage=1 '-sOutputFile=/tmp/magick-17292RtJq2Z8iF5iK%d' '-f/tmp/magick-17292wskX7eyNic7t' '-f/tmp/magick-17292jHMWYZOpLjVd'': **** Warning: Dropping incorrect smooth shading object.
**** File did not complete the page properly and may be damaged.
Error: /rangecheck in --run--
Operand stack:
-1 --nostringval--
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1884 1 3 %oparray_pop 1883 1 3 %oparray_pop 1867 1 3 %oparray_pop --nostringval-- --nostringval-- 2 1 1 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- false 1 %stopped_push --nostringval-- --nostringval--
Dictionary stack:
--dict:946/1684(ro)(G)-- --dict:1/20(G)-- --dict:82/200(L)-- --dict:82/200(L)-- --dict:109/127(ro)(G)-- --dict:292/300(ro)(G)-- --dict:27/32(L)-- --dict:6/8(L)-- --dict:21/40(L)--
Current allocation mode is local
GPL Ghostscript 9.07: Unrecoverable error, exit code 1
@ error/pdf.c/InvokePDFDelegate/276.
convert: no images defined `s1.jpg' @ error/convert.c/ConvertImageCommand/3288.
【问题讨论】:
-
不确定这是不是问题,但请参阅stackoverflow.com/questions/52861946/…。 Ghostscript 9.07 相当旧。你可能会升级。我相信当前版本至少是 9.25
-
我需要查看 PDF 文件才能发表评论,但该消息序列显示“您的 PDF 文件有问题”。虽然通常我会同意 fmw42 的评论,但目前将 Ghostscript 升级到最新版本将无济于事。您可以尝试 9.24 版,它可能对您有用。
-
我同意 KenS 的观点。一些较新版本的 Ghostscript 存在问题。但 9.23 对我来说是个好消息。
-
也许你的目标文件夹不是 imagemagick 可写的。似乎有同样的错误,但需要稍后做进一步的调查。
标签: imagemagick ghostscript imagemagick-convert