i made some stripes with this command:
convert -size 1x100 pattern:gray50 -scale 640x480\! stripesHORZ.gif
composite -compose Dst_In -gravity center stripesHORZ.gif image2.jpg temp1.png
composite -compose Dst_Out -gravity center stripesHORZ.gif image2.jpg temp2.png
convert temp1.png temp2.png -compose Plus -composite sliced.jpg
i want to take two images and make them into a single image by selecting alternate stripes.
i tried this but it doesn't work. i'm assuming the problem is that my stripes are white and black and one of the stripes should be clear instead of black or white.
any tips?
thanks,
dan
dst_in and black/white stripes to make sliced images?
-
- Posts: 7
- Joined: 2009-09-20T08:01:51-07:00
- Authentication code: 8675309
-
- Posts: 7
- Joined: 2009-09-20T08:01:51-07:00
- Authentication code: 8675309
Re: dst_in and black/white stripes to make sliced images?
i meant
composite -compose Dst_In -gravity center stripesHORZ.gif image1.jpg temp1.png
composite -compose Dst_Out -gravity center stripesHORZ.gif image2.jpg temp2.png
so not a typo problem as far as i know...
composite -compose Dst_In -gravity center stripesHORZ.gif image1.jpg temp1.png
composite -compose Dst_Out -gravity center stripesHORZ.gif image2.jpg temp2.png
so not a typo problem as far as i know...
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: dst_in and black/white stripes to make sliced images?
to exaggerate
convert -size 1x8 pattern:gray50 -scale 128x128\! -auto-level stripes.gif
convert zelda3.jpg mandril.jpg stripes.gif -compose over -composite zelda_mandril.jpg
see use of mask image at http://www.imagemagick.org/Usage/compose/
convert -size 1x8 pattern:gray50 -scale 128x128\! -auto-level stripes.gif
convert zelda3.jpg mandril.jpg stripes.gif -compose over -composite zelda_mandril.jpg
see use of mask image at http://www.imagemagick.org/Usage/compose/
-
- Posts: 7
- Joined: 2009-09-20T08:01:51-07:00
- Authentication code: 8675309
Re: dst_in and black/white stripes to make sliced images?
cool.
thanks!
i still don't quite understand all the subtleties as the examples in the usage seem to be for the composite command with 2 input images rather than the convert command with 3 input images. but it works great for me now!
and i'm assuming more will make itself clear to me in time.
thanks!
i still don't quite understand all the subtleties as the examples in the usage seem to be for the composite command with 2 input images rather than the convert command with 3 input images. but it works great for me now!
and i'm assuming more will make itself clear to me in time.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: dst_in and black/white stripes to make sliced images?
danpaluska wrote:cool.
thanks!
i still don't quite understand all the subtleties as the examples in the usage seem to be for the composite command with 2 input images rather than the convert command with 3 input images. but it works great for me now!
and i'm assuming more will make itself clear to me in time.
you can use composite rather than convert by reversing the two input images. The mask is binary and simply selected corresponding area to the white part of one image and the corresponding part to the dark part of the other image and merges them together by making the alternate transparent. White in the mask defines opaque for one image and transparent for the other and black is reversed for the two images.
convert is more modern and flexible than composite, so I tend to use it more as you can do multiple steps in one command where you must separate commands when you use composite.