请解释这种颜色混合模式公式,所以我可以复制它在PHP / ImageMagick [英] Please explain this color blending mode formula so I can replicate it in PHP/ImageMagick

查看:244
本文介绍了请解释这种颜色混合模式公式,所以我可以复制它在PHP / ImageMagick的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试使用ImageMagick来复制Photoshop颜色混合模式。我在在线指南中找到了以下公式,但我不知道什么他们的意思。我只需要交换某些频道?

I've been trying to use ImageMagick to replicate Photoshops Colour Blend Mode. I found the following formulas in an online guide but I don't know what they mean. Do I just need to swap certain channels?

推荐答案

A是前景像素,B是背景像素,C是新像素。 H是每个像素的色调值,S是饱和度值,L是亮度值,Y是亮度值。

A is the Foreground pixel, B is the Background pixel, C is the new pixel. H is the Hue value for each pixel, S is the Saturation value, L is the Luminance value, and Y is the Brightness value. (Not sure what the difference is between luminance and brightness though.

无论如何,在第一个例子中,新像素的Hue(H)和Saturation C)从前景像素(A)复制,而新像素的亮度(Y)值取自背景(B)像素的亮度(L)值。

Anyway, in the first example the Hue(H) and Saturation(S) values of the new pixel(C) are copied from the Foreground pixel(A) while the Brightness(Y) value of the new pixel is taken from the Luminance(L) value of the Background(B) pixel.

这篇关于请解释这种颜色混合模式公式,所以我可以复制它在PHP / ImageMagick的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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