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?".
"C:\Program Files\ImageMagick-6.9.7-Q8\convert.exe" -size 1000x1000 xc:black -fill white -stroke black -strokewidth 2 -draw "polygon 0,0 1000,1000 0,1000" intermed_mask.png
and open the png (in PS) I see an unexpected result: looking at the lower left corner I see on the left side a black and a gray line and on the bottom only a gray line. With -strokewidth 2 I expected on both sides two black lines. If I am using -strokewidth 1 there is at the bottom no black or gray line at all. For such compositing masks I need pixel exact surroundings of polygons so how can I fix this? Thanks!
So I think it is better to forget the stroke command and adapt the coordinates to simulate a kind of shrinking or pushing them away from the image edges.
For a strokewidth=1 this would be 1,1 999,999 1,999. But how can this adaption be made for arbitrary polygons? Ad hoc I would dissect the
image in four quadrants and make a distinction of cases to add/subtract the strokewidth like (x+s, y-s) for the lower-left quadrant.
I don't know what you are trying to do, so I don't know if you need a stroke. If you have a stroke, I suggest you experiment with the stroke colour different to the fill and the background. Then you can see it.
Normally, all polygon vertices should be in the range 0 to 999. If a vertex is outside the image, the polygon will be clipped.
I need a black hull/shell around a white polygon with a specified thickness. If those polygons are composed together with no overlap this simulates a controlled gap artifact (see https://www.flickr.com/photos/gbachelier/27419431099) that can be used as a mask to correct such kind of artifacts in a color composing.