doupao2277 2014-05-18 18:42
浏览 418
已采纳

使用PHP中的ICC配置文件将RGB转换为CMYK

I am currently building an online APP which allows users to pick a color for text from a usual javascript color picker. I want to convert the returned value to CMYK and I know there is not one simple run-of-the-mill method to achieve this, given there are ICC profiles and all that.

I still want to achieve a relatively useful conversion the way "most" users know from Photoshop. The profiles I want to use are "AdobeRGB" for the RGB colorspace, and "Coated Fogra39" for the CMYK colorspace.

What I want to know is, if there is any method to convert single color values from one colorspace to the other, by utilizing these two ICC profiles (which I have downloaded). There are methods to convert entire images with ImageMagick, but I am dying trying to find a way to just calculate from one color value to the other. I am also inclined to use other means of achieving this goal if there are any ideas out there.

Thanks.

  • 写回答

2条回答 默认 最新

  • dscjp19831212 2014-05-18 18:47
    关注

    You could use Imagick::setImageColorSpace

    Here's a tutorial

    Also i must warn you cmyk profile is for printing not for screening they will be differences and you can't calculate the same as rgb ( rgb misses the black thing ) an example for black ( everyone know's this color ) RGB Black : 0, 0, 0, CMYK Black: 100%; But they 100% key doesn't work the same on some printers you only need 100% on others like the one that i use a roland sp 540i i make a combination of colors to produce different types of black based on what i need because 100%key will not produce the black that everyone knows and you can test it even in photoshop / corel draw to see a difference if your screen helps u.

    Other examples:

    • Registration Black | C100 M100 Y100 K100
    • Neutral Rich Black (also known as Rich Black) | C40 M30 Y30 K100
    • Flat Black | C0 M0 Y0 K100 - This black is just made up of 100% of the black channel, with no other ink in the mix. Also known as Standard black.
    • Designer Black | C70 M50 Y30 K100 Pantone® Process Black | Spot-Color/’K100′ : This black is available as Pantone® Process Black C (coated), U, (Uncoated) and M (Matt).
    • Cool Black (also known as Black Bump) | C50 M0 Y0 K100 : This is the general-mix, but this black can also be comprised [typically] of between 20%-80% cyan.
    • Golden Black | C0 M0 Y60 K100 : This is the general-mix, but this black can also be comprised [typically] of between 20%-80% yellow.
    • Warm Black | C0 M60 Y0 K100 : This is the general-mix, but this black can also be comprised [typically] of between 20%-80% magenta.

    So you see CMYK is very different from rgb space because is used for printing and that means you will have trouble if you don't know how it works.

    Update: ICC Profiles are for monitors not for printing ..

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料