Proper CMYK half tone

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
PBn
Posts: 1
Joined: 2017-08-09T00:37:34-07:00
Authentication code: 1151

Proper CMYK half tone

Post by PBn » 2017-08-09T00:46:36-07:00

I read this post and got it working nicely https://www.imagemagick.org/discourse-s ... hp?t=18409

The problem is the textures for the dots are static size and I would like them to change in size like real halftone rather than opacity like this demo.
Image (demo result)

I've been trying to get it working by rotating and dithering the image then rotating it back.

The problem is I can't get it to NOT compose with the original image
(input image is always 640x360)

Code: Select all

    convert $filename 
      -colorspace CMYK \
      \( \
      -clone 0 \
      -channel C -level 0%,50% \
      -channel C -rotate 105 -ordered-dither h8x8a \
      -rotate -105 \
      +repage -gravity Center -crop "640x360+0+0" \
      \) \
      -channel C -compose multiply -composite \
      \( \
      -clone 0 \
      -channel CYK -evaluate set 0 \
      -channel M -level 0%,50% \
      -channel M -rotate 75 -ordered-dither h8x8a\
      -rotate -75 \
      +repage -gravity Center -crop "640x360+0+0" \
      -channel CMYK -separate \
      \) \
      -channel M -compose multiply -composite \
      \( \
      -clone 0 \
      -channel CMK -evaluate set 0 \
      -channel Y -level 0%,50% \
      -channel Y -ordered-dither h8x8a\
      -channel CMYK -separate \
      \) \
      -channel Y -compose multiply -composite \
      \( \
      -clone 0 \
      -channel CMY -evaluate set 0 \
      -channel K -level 50%,75% \
      -channel K -rotate 45 -ordered-dither h8x8a\
      -rotate -45 \
      +repage -gravity Center -crop "640x360+0+0" \
      \) \
      -channel K -compose multiply -composite \
      -colorspace sRGB \
      -quality 75 out.jpg

This produces a nice halftone effect but composed with the original image.

Anyone got a clue how to do this without saving intermediaries?

Post Reply