Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Imagick 中,当我在具有 alpha 通道(png)的图像中使用“negateImage”时,imagick 不能很好地处理透明度。我想保持透明度,只否定“彩色”像素。
原图
所需图像
我该怎么做?
尝试指定要否定的特定通道:
$imagick->negateImage(false, imagick::CHANNEL_RED | imagick::CHANNEL_GREEN | imagick::CHANNEL_BLUE);
以上假设是 RGB 图像。