尝试将PDF图转换为TIFF [R和ImageMagick]

时间:2017-10-21 15:34:28

标签: r pdf encoding imagemagick imagemagick-convert

我尝试使用ImageMagick's转换工具将R生成的PDF图转换为TIFF。我的管道如下。首先,我在R中绘制一个数字:

pdf("test.pdf")
hist(rnorm(1000))
dev.off()

然后我使用转换工具:

convert -density 1200 -compress lzw -alpha remove -depth 8 -units PixelsPerInch test.pdf test.tiff

但我收到以下错误:

   **** Error: Invalid BaseEncoding name "PDFDocEncoding" ignoring BaseEncoding.
               Output may be incorrect.
   **** Error: Invalid BaseEncoding name "PDFDocEncoding" ignoring BaseEncoding.
               Output may be incorrect.
convert-im6.q16: DistributedPixelCache '127.0.0.1' @ error/distribute-cache.c/ConnectPixelCacheServer/244.
convert-im6.q16: cache resources exhausted `test.tiff' @ error/cache.c/OpenPixelCache/3982.

我正在使用R版本为3.4.2的Linux机器。任何建议都非常感谢。

0 个答案:

没有答案
相关问题