Here's how I will do it with Imagemagick and php:
exec("convert -size 800x533 xc:white white.jpg");
exec("convert -size 800x533 xc:none -draw \"fill black circle 400,265 400,50\" write_mask.png");
exec("composite -compose Dst_Out write_mask.png white.jpg -matte step.png");
exec("convert IMG_5745.jpg step.png -composite -trim final.jpg");
Do you need to follow the process?
- .miff, .miff. , tempory, .