0

我一直在搜索有关如何使用 Imagemagick 创建图像区域焦点的信息。我没有在官方文档中建立任何东西。

我想模糊除由坐标确定的区域之外的所有图像。请帮忙!

4

1 回答 1

0

You can write a script with 3 steps (you could compact these steps in a single command but it would be harder to explain, so I'll keep it split):

  1. create a completely blurred version of your original image

  2. create a mask in which you define the 'focused' zone, for example a rectangle

  3. apply your mask to the blurred image to obtain the final image in which all the pixels are blurred but the ones inside the rectangle defined in the mask

convert original.png -blur 10x8 imagefuzz.png
convert original.png -fill white -draw "color 0,0 reset" -fill black -draw "rectangle 100,100,350,250" mask.png
convert original.png imagefuzz.png mask.png -composite output.png
于 2013-06-15T14:09:02.820 回答