Page 1 of 1

Producing a stippled image using imagemagick

Posted: 2013-02-13T23:09:54-07:00
by tom_a_sparks
I have a tutorial showing how to "Producing a stippled image with Gimp"[1],
but I would like to do it in imagemagick, so I can do 50+ pass on the same image

[1] http://wiki.evilmadscience.com/Producin ... _with_Gimp

Re: Producing a stippled image using imagemagick

Posted: 2013-02-14T01:21:40-07:00
by snibgo
Here's one way, using a Mona Lisa image clipped from your page. There is probably a better way that doesn't require the first command. Windows script; for a Mac change "^" to "\" and "%%" to "%".

Code: Select all

convert xc:White xc:Black -append map.png

convert ^
  monaLisa.png ^
  -modulate 100,0,100 ^
  +level 30%%,90%% ^
  -remap map.png ^
  ml0.png
The "-modulate" sets the saturation to zero, converting it to greys. "+level" reduces the contrast, setting what was black to 30% and what was white to 90%. Adjust as desired. "-remap" uses just the colours in map.png, ie black and white. By default, it dithers.

Re: Producing a stippled image using imagemagick

Posted: 2013-02-14T18:58:03-07:00
by fmw42
Snibgo,

I believe that you can put it into one command by using mpr format to create the map image in memory, delete the non-memory file, then use mpr to insert the memory file in place of the map.png.

If you need help, let me know.

Fred

Re: Producing a stippled image using imagemagick

Posted: 2013-02-14T20:27:21-07:00
by snibgo
Ah, yes, thanks. I've never used mpr. Still learning after all these years.

Code: Select all

convert ^
  xc:White xc:Black -append -write mpr:blackwhite +delete ^
  monaLisa.png ^
  -modulate 100,0,100 ^
  -auto-level ^
  +level 30%%,90%% ^
  -remap mpr:blackwhite ^
  ml2.png

Re: Producing a stippled image using imagemagick

Posted: 2013-02-14T20:39:42-07:00
by fmw42
snibgo wrote:Still learning after all these years.
So am I! This trick I learned from Magick. I had the same trouble a few months back and wondered why one could not use parenthesis processing on the map image. His reply was the mpr method. There is probably a post on it somewhere, but I do not recall where.

It is basically the same issue as with tiling when you need to have the tiled image before you can tile it (depending upon the tile method). See

http://www.imagemagick.org/Usage/canvas/#tile
http://www.imagemagick.org/Usage/canvas/#tile_memory

Fred

Re: Producing a stippled image using imagemagick

Posted: 2013-02-14T20:54:18-07:00
by anthony
The problem is that these operators were developed long before parenthesis and mutli-operation processing became common in IMv6
As such secondary images had to come from disk from in-memory.

Both these cases 'color map dithering' and 'tiling' need to be modified or replaced with a in-memory image version of the operation (much like CLUT does).

I'd love for example to include "-tile" but this is used in montage and display for other purposes, make it hard to use as is.

That is not to say a 'disk source' version is not useful, but a in-memory version can replace even those.