使用imagemagick将pdf文件的所有颜色转换为蓝色

时间:2017-04-02 02:26:43

标签: pdf imagemagick

如何使用imagemagick将所有颜色转换为蓝色?或任何其他简单快速的解决方案?

我没有黑色墨水,想要将灰度的pdf转换为蓝色,然后打印出来。 我的打印机选项有限。

2 个答案:

答案 0 :(得分:4)

不确定你的意思/期望,但试试这个:

convert input.pdf  +level-colors blue, blueResult.pdf

它应该将所有黑色色调转换为等效的蓝色色调。所以,如果你从这开始:

enter image description here

你会得到这个结果:

enter image description here

如果您的原始文档是彩色的,您可能需要先进行去饱和处理:

convert input.pdf -modulate 100,0 +level-colors blue, blueResult.pdf

答案 1 :(得分:1)

convert image.pdf -fill blue -colorize 100 image.pdf

我不确定这是你想要的。结果到处都是蓝色的。你想要别的吗?你说所有的颜色,但这包括白色和黑色和灰色阴影?

如果你想要每种颜色,但白色是蓝色,那么

convert image.pdf -fill blue +opaque white image.pdf

然而,IM不是用于从矢量格式转换为矢量格式的好工具。 IM将光栅化矢量图像,然后在其周围放置一个矢量壳。