# 19.08.92 v1.01 commonpic001 Keven Fedirko
#
# This is a description of how to create two pictures that you want to have
# the same pixels that are common to each picture file.  The first two
# pictures for this example are "test.1" and "test.2".  The diffpic program
# will be used to first find the "different" pixels in each image.  The con-
# trast program will generate a high-contrast image from the picture file
# output with the diffpic program.  Because it is high-contrast the anti-
# aliasing will be lost, since there is no way for the program to "know"
# which pixels are edges.  The "correct" alpha channel of the common-pixel
# image needs to be created.  This is done with the alpha program.  In this
# case the red channel is used.  A black frame is created the same size as
# the original pictures.  This will be used to adopt the correct alpha
# channel for compositing purposes.  Then the composite program is used to
# overlay the two original images, and the black_alpha file is layed on top.
# This will produce the desired output file.  Voila! 

# Note:  With the use of the "diffpic" program, it is necessary to quit the
# window that is created.  In Irix 4.0 simply call up the process requester
# by holding down the "Alt" key and clicking the right mouse button.
# Possibly the same result can be obtained with commonpic002 which uses the
# compositor to perform the same function, but the output picture looks
# different.

diffpic test.1 test.2 -o test_ab -i
gradation black 400 400 -v 0 0 0 0 0 0 -V
contrast test_ab test_ab_con .001 -v
alpha test_ab_con test_ab_con_alpha 1 0 1 0 0 0 0 -v
getalpha black test_ab_con_alpha black_alpha
composite test_new -v test.1 test.2 black_alpha
rm test_ab*.pic
rm black*.pic
