Page 1 of 1

Overlay a user defined pattern?

Posted: 2011-04-26T08:40:06-07:00
by pash
Hi,

searched the forum but didn't find a solution.
How do I overlay a user defined pattern like dots, or stripes on an image to produce a output like this with black dots:

Image

Re: Overlay a user defined pattern?

Posted: 2011-04-26T09:44:19-07:00
by fmw42
pash wrote:Hi,

searched the forum but didn't find a solution.
How do I overlay a user defined pattern like dots, or stripes on an image to produce a output like this with black dots:

Image

It would be best to provide links to the original picture and the pattern picture. But assuming you already have a pattern image as black/white, try

convert backgroundimage patternimage -compose multiply -composite resultimage

also see ordered dither at http://www.imagemagick.org/Usage/quanti ... red-dither

also you might like to look at my scripts, grid and screeneffects, at the link below.

Re: Overlay a user defined pattern?

Posted: 2011-04-26T09:58:07-07:00
by pash
Thank you.

Here the before image:

http://image-upload.de/image/hyVAYB/fac28b7080.png

Image here-> Image

and the pattern (dot):

http://image-upload.de/image/x0Nfrr/d1d51700f5.png

Image here -> Image

Thank you for your link to your scripts, I will look at them. :O)

PS: I just thougt that there maybe an option to pass an image and a pattern to imagemagick and they will be combined (overlayed)

Re: Overlay a user defined pattern?

Posted: 2011-04-26T12:33:32-07:00
by fmw42
this is the easiest way as long as your pattern has transparency. just tile it over your other image. see http://www.imagemagick.org/Usage/compose/#tile

composite -tile d1d51700f5.png fac28b7080.png result.png