Setting an alpha channel when constructing an ImagickPixel

半世苍凉 提交于 2019-12-06 08:33:11

Looks like the way to do it is to just use rgba:

$myImagickPixel = new ImagickPixel("rgba(250,15,150,0)"); //Where the last digit is the alpha and 0 is transparent and 1 is fully opaque.

I found some documentation on the allowed formats:

http://www.imagemagick.org/script/color.php

The format you want is "#rrggbbaa", so half-transparent red is "#FF00007F".

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!