Newbie needs help with "composite"
Posted: 2008-10-30T17:35:17-07:00
Help. (IM 6.2.8 on RHEL5.)
1) I have large series of files with each member of the series consisting of two PNG images. One image is the background (the form) and ones the foreground (the data fields that fill in the form).
2) They're both monochome, but I have no idea if the background color on each image is white or transparent (how to tell? does it matter?)
3) They're different sizes - the foreground is smaller than the background.
4) All I want to do is composite (overlay) the foreground and background, preserving everything in each image, and stretching the width of the foreground to make it the same as the width of the background (so they overlay evenly). The result should look like a filled-in form.
I'm having real problems with this and think I'm just having conceptual difficulties understanding IM's model. I'm playing with lots of variations of "composite" and "convert" but all that happens is that the composite image ends up with both of the old images, side by side, or one image obliterates the other completely. I'm not getting anywhere with actual overlaying of both together, let alone getting the sizes right.
What am I doing wrong here? Most of what I've tried is variations on:
# convert background.png foreground.png -gravity center -flatten newimage.png
thanks for any help and pointers.
1) I have large series of files with each member of the series consisting of two PNG images. One image is the background (the form) and ones the foreground (the data fields that fill in the form).
2) They're both monochome, but I have no idea if the background color on each image is white or transparent (how to tell? does it matter?)
3) They're different sizes - the foreground is smaller than the background.
4) All I want to do is composite (overlay) the foreground and background, preserving everything in each image, and stretching the width of the foreground to make it the same as the width of the background (so they overlay evenly). The result should look like a filled-in form.
I'm having real problems with this and think I'm just having conceptual difficulties understanding IM's model. I'm playing with lots of variations of "composite" and "convert" but all that happens is that the composite image ends up with both of the old images, side by side, or one image obliterates the other completely. I'm not getting anywhere with actual overlaying of both together, let alone getting the sizes right.
What am I doing wrong here? Most of what I've tried is variations on:
# convert background.png foreground.png -gravity center -flatten newimage.png
thanks for any help and pointers.