Page 1 of 1

Posted: 2006-07-13T21:41:47-07:00
by anthony
Looks like you need to first convert the image into the appropriate number of greyscale levels.

One method is given in
http://www.cit.gu.edu.au/~anthony/graph ... #color_lut
You can grey the image as well and level the gradient using

Code: Select all

-fx 'floor(intensity*11)/10'
Then you want to replace each grey level with a tile of the appropriate halftone for that grey level.

See IM Examples color replacement (still raw notes) using -draw color replace to replace the color with a tile image
http://www.cit.gu.edu.au/~anthony/graph ... #floodfill

You can also try using some ordered dithers, as was exampled in GIF transparency handling for non-specific backgrounds..
http://www.cit.gu.edu.au/~anthony/graph ... ts/#dither

By taking an ordered dither, bluring and then thresholding, you can get a pretty reasonable faked halftone screen.

Do you have other halftone screen images such as the one you gave at other scales? These may be useful for a later section on halftones in the
Color IM Examples page.

Posted: 2006-07-16T18:10:41-07:00
by anthony
And please let the rest of us know exactly how it went, and what commands you ended up using. I would like to add a halftoning method to the
monocrome color reduction area of IM examples (currently in development).

Posted: 2006-07-23T18:58:55-07:00
by anthony
Of course the half tone screen will be 'dots' like that as it is limited to on and off pixels.

Hmm lit looks very much like the -ordered-dither function of IM however that only has a mazimum of a 4x4 pixel 'square', and is not very hafltone-like.

Run this to see the -ordered-dither pattern

Code: Select all

convert -size 4x4 gradient: -scale 64x64 \
       -ordered-dither 4x4 -scale 256x256 miff:- | display - 
As you can see it isn't a half-tone like screen, but with some way of feeding a ordered dither pattern, it could be made to be a half-tone pattern. perhaps a future -ordered-dither 8x8 function!

Currently the only reference to this in IM examples is
GIFs for non-specific backgrounds
http://www.cit.gu.edu.au/~anthony/graph ... ts/#dither
But I am planing a full overview in the 'Colors' section, as I get time for it.

Posted: 2006-07-24T18:06:28-07:00
by glennrp
I've extended the "-ordered-dither" option to provide some half-tone-like
patterns. It will be available in ImageMagick-6.2.8-6 (beta) tomorrow.

The new options are 2x1, 4x1, 6x1, and 8x1.

Glenn

Posted: 2006-07-24T21:03:55-07:00
by anthony
Thanks Glen

Posted: 2006-07-25T17:56:22-07:00
by anthony
If you can rotate the halftone images (one for each grey level)
so that you can generate an appropriate overlay tile, then you can still do it.

EG: take a halftone tile and tile it to cover a large area than the
original image, rotate it, crop it so the rotated image halftone screen can cover the original image, now use it as the tile to replace that specific
grey level in the image. Repeat for the other half-tones.