使用ImageMagick转换颜色(不是图像) [英] Converting colors (not images) with ImageMagick

查看:492
本文介绍了使用ImageMagick转换颜色(不是图像)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更具体地说,我想准确地将CMYK值(可能来自 ISO Coated v2 空间)转换为RGB值(可能来自<$ c $ Ruby平台上的c> sRGB space)(可能使用ICC配置文件)。

More specifically, I'd like to accurately convert a CMYK value (probably from the ISO Coated v2 space) to an RGB value (probably from the sRGB space) on the Ruby platform (probably using ICC profiles).

ImageMagick似乎是一个很好的起点,但我'我们还听说LittleCMS可能已被移植/包装以使用 Ruby

ImageMagick seemed like a good place to start, but I've also heard that LittleCMS might have been ported/wrapped to work with Ruby.

再一次,我是希望转换单色,而不是图像文件。有什么想法?

Once again, I'm looking to convert single colors, NOT image files. Any ideas?

推荐答案

在ImageMagick中,您可以执行以下操作:

In ImageMagick, you can do the following:

convert xc:"cmyk(0,255,255,0)" -colorspace sRGB -format "%[pixel:u.p{0,0}]\n" info:
red

convert xc:"cmyk(0,255,255,0)" -profile /Users/fred/images/profiles/USWebCoatedSWOP.icc -profile /Users/fred/images/profiles/sRGB.icc -format "%[pixel:u.p{0,0}]\n" info:
srgb(93%,11%,14%)

这篇关于使用ImageMagick转换颜色(不是图像)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆