today I’ve written a program that does this:
Here it is: Source on Github
The input format has to be Portable Gray Map in binary mode (P5) and the output format is Magick Vector Graphic.
convert yourimage.jpg yourimage.pgm dotify 5 < yourimage.pgm > yourimage_dotted.mvg convert yourimage_dotted.mvg yourimage_dotted.jpg
If you have a look at sample.cpp and change the samples-function then you’ll be able to change at which points the dots are placed. Maybe you want to outsource this into a (lua?) script, so you don’t have to recompile on every sampling-method-change or you just want to add further methods to the code and a command line switch to enable them. Feel free to fork me and to send me a merge request.