Posts

Showing posts with the label Imagemagick Convert

Blur Part Of Image In Imagemagick

Image
Answer : In ImageMagick, you can use any mask to limit the blur. Create a black and white mask image: black inside your quadrilateral and white elsewhere of the size of your image. Then use that as a mask for doing blurring. See http://www.imagemagick.org/Usage/masking/#read_mask. Input: (Unix syntax) convert \ logo.jpg \ \( -clone 0 -fill white -colorize 100 -fill black \ -draw "polygon 332,180 427,105 481,238 399,279" \ -alpha off -write mpr:mask +delete \) \ -mask mpr:mask -blur 0x5 +mask logo_blur.jpg Blurred Result Use -region http://www.imagemagick.org/Usage/masking/#region_warping convert a.png -region 150x150+599+261 -implode 1.5 +region b.png