简体   繁体   中英

use ImageMagick command to draw sequence of points in c++

If I want to draw a circle at position (10,10) for size(5,5) on the image test.jpg, I could use the command

system("convert test.jpg -fill blue -draw \"circle 10,10,5,5\" output1.jpg");

Now I have a sequence of points saved in a vector pts, is there an efficient way to finish the drawing in a for loop?

You can write a for-loop and given coordinates and size of your circle you can create a string with command which you can later pass to system again. Look at function to_string

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM