Creating random noise with Magick++
Posted: 2015-06-18T08:57:52-07:00
I've found a lot of documentation online about using ImageMagick's command line functions to create images of random noise, but have not been able to figure out how to reproduce that in Magick++.
ImageMagick has the +noise method Random:
convert -size 100x100 xc: +noise Random random.png
I would like to be able to set a pixel to Color("random"), for example:
sought.extent(Geometry(640,416), Color("random"), CenterGravity);
To embed a smaller image in a canvas of random noise. Of course, random isn't an acceptable argument for Color, but I'm wondering if the equivalent exists? The ideal would be if it were also possible to limit the range of colors - for example only 12-bit (#000-#FFF).
ImageMagick has the +noise method Random:
convert -size 100x100 xc: +noise Random random.png
I would like to be able to set a pixel to Color("random"), for example:
sought.extent(Geometry(640,416), Color("random"), CenterGravity);
To embed a smaller image in a canvas of random noise. Of course, random isn't an acceptable argument for Color, but I'm wondering if the equivalent exists? The ideal would be if it were also possible to limit the range of colors - for example only 12-bit (#000-#FFF).