Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/algorithm/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
更改像素';带imagemagick的s alpha值_Imagemagick_Imagemagick Convert - Fatal编程技术网

更改像素';带imagemagick的s alpha值

更改像素';带imagemagick的s alpha值,imagemagick,imagemagick-convert,Imagemagick,Imagemagick Convert,我有一个带有一些不透明白色像素的图像(rgba=FFFFFF)。我想将这些像素更改为具有不同透明度的不同颜色,例如rgba=33355 我用 convert test.png -fuzz 1% -alpha set -fill '#33333355' -opaque '#ffffffff' test2.png 像素的颜色被正确地改变了,但是alpha值没有改变,所以我得到了rgba=333 ff的新像素 为什么我可以更改rgb值,但不能更改alpha值??如何更改alpha值 谢谢你错过了这个

我有一个带有一些不透明白色像素的图像(rgba=FFFFFF)。我想将这些像素更改为具有不同透明度的不同颜色,例如rgba=33355

我用

convert test.png -fuzz 1% -alpha set -fill '#33333355' -opaque '#ffffffff' test2.png
像素的颜色被正确地改变了,但是alpha值没有改变,所以我得到了rgba=333 ff的新像素

为什么我可以更改rgb值,但不能更改alpha值??如何更改alpha值

谢谢你错过了这个选项。我相信默认通道值是‘RGBK,sync’;但是,您尝试将像素更改为“RGBA”

convert test.png\
-绒毛1%\
-阿尔法集\
-RGBA频道\
-填写“#333 55”\
-不透明'#ffffffff'\
test2.png