[magick-users] Abutting two images can change their colour
Damien Dunlop
djd at cmad.com.au
Wed Jul 23 15:35:47 PDT 2008
By merely placing two images side-by-side the colour changed!
How come?
A description of this phenomena was posted previously.
I have attempted to clarify and simplify that.
Although the phenomena was first noticed with much larger,
complex images, to avoid having to post those images, the
following simple commands are presented.
The first command is used to create a single-colour test image,
A.gif.
The second command is used to create a multi-colour test image,
B.gif.
Note that although this command specifies single-colour
horizonatal slices, the result contains some `foreign' pixels
within some slices?????.
The original `real' images include up to 200 colours, however by
experimenting, the number in B.gif was reduced to 31 and could be
reduced further.
The third command simply places B.gif north of A.gif in a new image
C.gif
On my PC (Win XP, IM 6.4.2), the entire area in C.gif
corresponding to the original A.gif is `splattered' with foreign
pixels. The extent of the splattering is very sensitive to the
colours used, the colour distribution and height(????) of B.gif.
For example, by simply reducing the height by one pixel (5 to 4)
in the -size option of the command for creating B.gif, the area
splattered in C.gif is greatly reduced.
a) Create A.gif
convert -size 300x182 xc:'rgb(190,225,248)' A.gif
b) Create B.gif
convert -size 300x5 xc:white \
-gravity south \
-background 'rgb(215,186,210)' \
-splice 0x10 \
-background 'rgb(178,220,247)' \
-splice 0x2 \
-background 'rgb(212,235,249)' \
-splice 0x3 \
-background 'rgb(178,220,245)' \
-splice 0x1 \
-background 'rgb(190,225,246)' \
-splice 0x11 \
-background 'rgb(213,222,225)' \
-splice 0x1 \
-background 'rgb(0,50,50)' \
-splice 0x1 \
-background 'rgb(0,45,45)' \
-splice 0x1 \
-background 'rgb(0,30,30)' \
-splice 0x1 \
-background 'rgb(50,102,102)' \
-splice 0x1 \
-background 'rgb(222,239,238)' \
-splice 0x1 \
-background 'rgb(223,238,237)' \
-splice 0x1 \
-background 'rgb(14,91,78)' \
-splice 0x1 \
-background 'rgb(146,200,189)' \
-splice 0x1 \
-background 'rgb(0,139,104)' \
-splice 0x1 \
-background 'rgb(0,159,98)' \
-splice 0x1 \
-background 'rgb(0,115,70)' \
-splice 0x1 \
-background 'rgb(165,213,193)' \
-splice 0x1 \
-background 'rgb(0,135,64)' \
-splice 0x1 \
-background 'rgb(0,172,75)' \
-splice 0x1 \
-background 'rgb(8,149,54)' \
-splice 0x1 \
-background 'rgb(213,233,215)' \
-splice 0x1 \
-background 'rgb(0,50,0)' \
-splice 0x1 \
-background 'rgb(50,102,50)' \
-splice 0x1 \
-background 'rgb(103,153,103)' \
-splice 0x1 \
-background 'rgb(91,189,43)' \
-splice 0x1 \
-background 'rgb(123,184,89)' \
-splice 0x1 \
-background 'rgb(102,153,50)' \
-splice 0x1 \
-background 'rgb(153,204,102)' \
-splice 0x1 \
B.gif
c) Command for creating C.gif
convert B.gif A.gif -append C.gif
More information about the Magick-users
mailing list