画像変換 ImageMagickの周辺事項(convert, pdfcrop)

Imagemagickでいろんなことができるのだと学んだ。

(1)convert
pdf > eps or level-2 eps
などができる。

$ convert test.pdf test_level1.eps
$ convert test.pdf eps2:test_level2.eps


(例)圧縮率が違うとこんなに違う

・pdf: 0.45MB
・level-1 eps: 32MB
・level-2 eps: 0.88MB

参考1
http://osksn2.hep.sci.osaka-u.ac.jp/~naga/miscellaneous/tex/tex-eps.html

参考2
http://m.ils.uec.ac.jp/memo/eps.txt


(2)pdfcrop
pdfの余白を自動で切り取ってくれる。
keynoteで図を作成したりするとどうしても余白ができてしまう。

$ pdfcrop test.pdf
>> test-crop.pdf という、トリミングされたpdfができる(60秒ほど要することもある)。

$ convert test-crop.pdf eps2:test-crop.eps
>> test-crop.eps という、トリミングされたepsができる。

参考
http://tex.stackexchange.com/questions/171455/what-is-a-good-workflow-for-importing-and-cropping-eps-images


(3)参考

理由は不明だが、以下の方法では余白のないepsを作れない。

・previewで範囲を選択 Commend+c Command+n Command+s (名前をtest2.pdfとして保存)
>> test2.pdf は、トリミングされて「いる」。
・$ convert test2.pdf eps2:test2.eps
>> test2.eps は、トリミングされて「いない」。