GhostScript 9 / ICC 配置文件 - 可以用来将 PDF 中的单一颜色从 RGB 转换为 CMYK?

发布于 2024-12-15 03:41:16 字数 685 浏览 2 评论 0原文

我看到了这个问题的公认答案: 脚本(或其他方式)将 PDF 中的 RGB 转换为 CMYK?

...它提到了 GhostScript 9 的 ICC 配置文件功能,以及 GhostScript 无需重新提取 PDF 的能力“复炸”。

这听起来可能是我一直在我的任务寻找一种处理 PDF 文件的方法,以用特定的 CMYK 值替换单一 RGB 颜色。

注意:我不想执行颜色的自动映射 - 我想控制哪些颜色映射到哪些其他颜色(只使用了几种颜色)。

问题是,我对 ICC 配置文件知之甚少,而且 GhostScript 站点实际上除了命令行选项的详细信息之外似乎没有任何教程或信息。

那么:此 ICC 配置文件功能是否可以让我定义要替换的特定 RGB 颜色以及特定的 CMYK 替换?如果是这样,您将如何处理?那里有教程吗?

I saw the accepted answer to this question: Script (or some other means) to convert RGB to CMYK in PDF?

...and it mentioned the ICC profile capability of GhostScript 9, and the ability of GhostScript to re-distill a PDF without "re-frying".

This sounds like it might be the solution I've been looking for in my quest to find a way of processing a PDF file to replace a single RGB colour with a specific CMYK value.

Note: I don't want to perform an automated mapping of colours - I want to control which colours get mapped to which other colours (there are only a few colours used).

Trouble is, I know zilch about ICC profiles, and the GhostScript site doesn't actually seem to have any tutorials or information other than details of the command line options.

So: would this ICC profile capability let me define specific RGB colours to be replaced, with specific CMYK relplacements? If so, how do you go about that? Any tutorials out there?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

故人的歌 2024-12-22 03:41:16

第一的;你错了,Ghostscript 不会“重新编译”PDF,它肯定会这样做。传入的 PDF 被完全解释、转换为一系列图形基元并发送到目标设备。如果设备是 pdfwrite,那么这些将被重新组装成一个全新的 PDF 文件。

它不做的是将其转换为 PostScript,但这并不完全相同。

至于你的实际问题;不,您目前无法执行此操作,而且您也不太可能执行此操作。对于初学者来说,pdfwrite 通常会保留所有颜色,但不会转换它们。如果有特别要求,它会执​​行一些转换,但目前不使用 ICC 配置文件来执行此操作,而是使用 PostScript 定义的方法来转换到特定的设备空间。

当我们继续使用 ICC 配置文件进行转换时,您将能够指定配置文件来进行转换,在这种情况下,您确实能够控制转换。为此,您需要非常彻底地了解 ICC 配置文件,这远远超出了此处答案的范围。有一些关于颜色主题的书籍,这些书籍通常包含有关 ICC 配置文件的信息。

老实说,简单地修改 Ghostscript pdfwrite 设备来执行您想要的操作可能会更好。

First; you are mistaken that Ghostscript does not 're-fry' the PDF, it most certainly does. The incoming PDF is fully interpreted, converted to a series of graphics primitives and sent to the destination device. If the device is pdfwrite then these are re-assembled into a brand-new PDF file.

What it does not do is convert it to PostScript, but that's not quite the same thing.

As for your actual question; no you can't currently do this, and its unlikely you will be able to do so. For starters pdfwrite normally preserves all colours, it doesn't convert them. If specifically requested it does some conversions, but it doesn't use the ICC profile to do so at the moment, it uses the PostScript defined method for conversion to a specific device space.

When we move on to do the conversion using ICC profiles then you will be able to specify profiles to do the conversion, and in this case you will indeed be able to control the conversion. To do this you will need to understand ICC profiles quite thoroughly, and this is well beyond the scope of an answer here. There are books on the subject of colour and these generally include information on ICC profiles.

To be honest, you would probably be a lot better off simply modifying the Ghostscript pdfwrite device to do what you want.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文