是否有任何客户端技术能够通过 ICC 颜色配置文件将 sRGB 转换为 CMYK?
浏览器中是否有可用的技术(客户端)能够使用指定的 ICC 颜色配置文件将 sRGB 颜色转换为 CMYK,反之亦然?
我目前正在使用隐藏的 Java 小程序进行转换(Java 有一个内置的类),但我正在尝试寻找替代方案,因为 Java 小程序速度缓慢且过时。
如果浏览器支持 SVG 中的 ICC 颜色,则 SVG 将是理想的选择,但没有人支持做。 Flash 或 Silverlight 也不错,但我找不到任何相关的东西。
Is there any technology available in a browser (client-side) able to convert sRGB colors to CMYK and vice versa using a specified ICC color profile?
I'm currently using a hidden Java applet for the conversions (Java has a built-in class for this), but I'm trying to find an alternative, since java applets are slow and outdated.
SVG would be ideal if browsers supported ICC colors in SVG, but no-one does. Flash or Silverlight would also be good, but I can't find anything relevant.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为您想要使用显示设备的 ICC 配置文件是否正确?
我相当确定没有工具可以使用 JavaScript 确定显示设备 ICC 配置文件。充其量在 Flash 等第三方环境中也是可能的。数学本身是没有问题的。
当然,这都是网络浏览器的责任。 Firefox 对颜色管理有相当好的支持。如果我没记错的话,微软将在 IE9 中解决颜色管理问题。
Am I correct in thinking you want use the ICC profile of the display device?
I am fairly certain there is no facility to determine the display device ICC profile using javascript. At best it may be possible in a third party environment like Flash. The math itself would be no problem.
Of course, this is all really the responsibility of the web browser. Firefox has reasonably good support for colour management. If I'm not mistaken, Microsoft are going to be addressing colour management in IE9.
读完你的问题后,我无法决定是否
:您正在尝试进行软打样操作,或者
b.您正在构建一个颜色选择器类型的应用程序,并且您想要
为您的用户提供某些颜色的名称(例如
pantone 或 NCS 等)当您显示其 sRGB 值时
近似值,或
c.完全是另一回事。
您关心的 CMYK 空间是什么?如果您正在执行选项(a)——软打样——您可能可以将曲线拟合到 CMYK 配置文件中的 LUT,并使用它们找出“快捷方式”转换,然后可以在非 ICC 中运行该转换了解您正在使用的 javascript 运行时。大多数 CMYK 配置文件都使用 LUT 进行转换,并且许多配置文件使用 ICC4 NamedColor2 值(您可能将其称为“ncl2”ICC 标记中的值)。
如果是这种情况,我可以向您指出一些有关如何执行此操作的资源 - 我自己在我正在开发的 python django 颜色管理图像分析应用程序平台中使用 SciPy 来完成此操作。
如果您正在执行选项 (b),并且需要颜色名称,则可以从 CMYK 配置文件中提取所需的名称(最有可能是 NamedColor2 值)并构建一个查找表,然后可以将其序列化为 JSON,以便可以将其加载到您的应用程序中。如果您的应用程序需要对显示空间有一定的了解,您可能可以让用户针对其显示“校准”您的应用程序——向他们提供一些问题,以便您计算白点偏移(可能还有 RGB XYZ) tristimulii),然后也许创建一个快速变换(我猜这可能与一个色彩适应变换一样简单),然后在显示它们之前将其应用于您想要“颜色管理”的颜色值。
要在没有 CMS 系统的情况下进行转换,Bruce Lindbloom 的数学是一个很好的起点:
http://www.brucelindbloom.com /
如果是 c) 我很好奇它是什么。
有什么帮助吗?如果您补充您的问题,我可以详细说明和/或提供示例代码&c(我正在类似的问题域中工作,因此我们都可以在这一点上获胜)。
After reading your question, I can't decide if:
a. you're trying to do a soft-proof operation, or
b. you're building a color picker type of app, and you want to
provide your users with the names of certain colors (from e.g.
pantone or NCS or somesuch) when you display their sRGB-value
approximations, or
c. something else entirely.
What is the CMYK space you are concerned with? If you're doing option (a) -- soft proofing -- you can probably fit curves to the LUTs in the CMYK profile, and use them to figure out a 'shortcut' transform that you can then run in the non-ICC-aware javascript runtime you're working in. Most CMYK profiles do their conversion with LUTs, and many use ICC4 NamedColor2 values (which you may know as the value in 'ncl2' ICC tags).
If this is the case, I can point you to some resources on how to do that -- I am doing it myself using SciPy in the python django color-management image-analysis app platform thing I am working on.
If you're doing option (b), and you need color names, you can extract the names you need from your CMYK profile (most likely NamedColor2 values) and build a lookup table, which you can then serialize it to JSON so you can load it in your app. If your app needs to have some knowledge of the display space, you can probably have the user 'calibrate' your app for their display -- feed them some questions that will allow you to calculate the white-point offset (and possibly the RGB XYZ tristimulii) and then maybe create a quickie transform (which could be as simple as one chromatic adaptation transform I am guessing) which you then apply to color values you want to 'color manage' before you display them.
To do the transforms without a CMS system, Bruce Lindbloom's math is a good place to start:
http://www.brucelindbloom.com/
if it's c) I am very curious as to what it is.
is any of that helpful? I can elaborate and/or provide example code, &c, if you supplement your question (I'm doing work in a similar problem-domain, so we could both win on this).