I've been creating "painted" images using a time-lapse sequence with convert -compose lighten image1.jpg image2.jpg output.jpg
I would then copy output.jpg to image2.jpg and move on to the next image in the place of image1.jpg
Not pretty, but it worked.
Since my last attempt, I upgraded my Linux Mint install, which came with a new version of ImageMagick:
rsc@Titan /local/2013-03-13 $ convert --version
Version: ImageMagick 6.7.7-10 2012-08-17 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP
Now when I try the exact same commands I was using, I get two output images. output-1.jpg and output-2.jpg. Each slightly different. Did the syntax change? Is this a bug? I have no idea why it would be creating the two files when it did not before.
Here's an example of the commands I run to get the result I want:
# I use this command to seed the loop
$ cp IMG_6492.JPG compose_temp.jpg
# this for loop uses the seq command to create a sequential list to loop through the files - my canon camera uses IMG_####.JPG, ao I need a sequence of four-digit numbers with a starting point, an increment (1) and a final number
$ for n in {`seq 6493 1 9700`}; do convert -compose lighten IMG_${n}.JPG composite_temp.jpg composite_${n}.jpg; mv composite_${n}.jpg composite_temp.jpg; echo $n done; done
But now the convert outputs composite_${n}-0.jpg and composite_${n}-1.jpg so the mv command fails. Bug? Expected behavior now?
convert creating multiple output files [6.7.7]
-
- Posts: 2
- Joined: 2013-03-14T20:09:56-07:00
- Authentication code: 6789
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: convert creating multiple output files [6.7.7]
"-compose lighten" is just a setting that will be used in a subsequent command like "-composite". You need a "-composite" command, thus:
Because you are not compositing the images together, you still have 2 images when you do the write, hence IM creates two files.
IM v6.7.7 is very old; I suggest you upgrade to a newer version. In particular, there were issues around that time concerning RGB/sRGB, and versions from 6.7.9 were far more stable.
Code: Select all
convert infileA infileB -compose Lighten -composite outfile
IM v6.7.7 is very old; I suggest you upgrade to a newer version. In particular, there were issues around that time concerning RGB/sRGB, and versions from 6.7.9 were far more stable.
snibgo's IM pages: im.snibgo.com
-
- Posts: 2
- Joined: 2013-03-14T20:09:56-07:00
- Authentication code: 6789
Re: convert creating multiple output files [6.7.7]
Thanks for the tips! I'll add the -composite. Don't know why, but it worked before without it.
Unfortunately, whichever repository Mint 14 uses has ImageMagick 6.7.7. :\ I even checked the unstable branch. I'll look around for 6.7.9 - maybe build from source.
Thanks again!
Unfortunately, whichever repository Mint 14 uses has ImageMagick 6.7.7. :\ I even checked the unstable branch. I'll look around for 6.7.9 - maybe build from source.
Thanks again!