ImageMagick is definitely less confusing than it
used to be, but the order of options still matters.
>From Anthony's helpful description of how it works, I
assumed that one can create a canvas and then place various
objects on the canvas. In doing this, the objects would be
layered in the order they appear within the command and
then finally merged at the end with say -flatten.
The following command creates a canvas, overlays a smaller area,
then draws two lines. But it appears the lines are applied
not only to the original canvas, they are also applied to the
overlaid area.
convert -size 1500x1500 xc:white \
\( -size 1000x500 xc:lightblue -repage 0x0+0+950 \) \
-stroke black -linewidth 5 \
-draw 'line 1499,50 50,50' \
-draw 'line 50,50 50,950' \
-flatten A.gif
If the option overlaying the smaller area is shifted
to after the -draw options as below, then the two lines appear
as intended.
convert -size 1500x1500 xc:white \
-stroke black -linewidth 5 \
-draw 'line 1499,50 50,50' \
-draw 'line 50,50 50,950' \
\( -size 1000x500 xc:lightblue -repage 0x0+0+950 \) \
-flatten B.gif
The above is the reduction of a complex command involving
multiple image overlays, multiple lines and multiple annotations.
It took considerable time to discover why unwanted lines
mysteriously appeared - sometimes in colors different from
those originally specified.
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users