Page 1 of 1
error with multiple filenames
Posted: 2010-07-02T23:11:32-07:00
by jbeale
I'm running WinXP SP3. Imagemagick works as expected, when converting individual images, but when I try to operate on a set of images at once, I get a strange error. (note, "hnames.txt" is a list of image filenames). Any suggestions?
Code: Select all
C:\test>composite base.png test1.gif -compose darken out001.png # <-- works as expected
C:\test>composite base.png @hnames.txt -compose darken out%03d.png
composite: unable to open image `magick': No such file or directory @ error/blob.c/OpenBlob/2498.
composite: no decode delegate for this image format `magick' @ error/constitute.c/ReadImage/532.
C:\test>composite --version
Version: ImageMagick 6.6.2-5 2010-06-09 Q8 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features: OpenMP
Re: error with multiple filenames
Posted: 2010-07-03T06:14:13-07:00
by magick
We can reproduce this problem and will have a patch in ImageMagick 6.6.3-0 Beta by sometime tomorrow. Thanks.
Re: error with multiple filenames
Posted: 2010-07-03T08:53:48-07:00
by jbeale
magick wrote:We can reproduce this problem and will have a patch in ImageMagick 6.6.3-0 Beta by sometime tomorrow. Thanks.
Wow! Never expected that on a holiday weekend- thanks for the extremely prompt response! Looking forward to trying the patch. -John
Re: error with multiple filenames
Posted: 2010-07-05T13:52:56-07:00
by jbeale
I attempted to compile IM 6.6.3.1 beta using MS Visual Studio 2010 Express, but was unable to. A quick google of the error message suggests that the "Express" version of Visual Studio is inadequate for this job, and I don't have the full version. Is there a place to get a precompiled Win32 version, or should I just wait for a regular release?
142>c:\documents and settings\john\my documents\downloads\imagemagick-6.6.3-1-windows\imagemagick-6.6.3\win2k\imdisplay\stdafx.h(15): fatal error C1083: Cannot open include file: 'afxwin.h': No such file or directory
Re: error with multiple filenames
Posted: 2010-07-05T15:02:16-07:00
by magick
You can build most ImageMagick applications with Visual Express. Just skip imdisplay and ImageMagickObject.
The patch you're looking for should be in the Imagemagick 6.6.3-0 Windows binary distribution.
Re: error with multiple filenames
Posted: 2010-07-05T20:43:43-07:00
by jbeale
Thanks again for the prompt help. Ok, 6.6.3.0 is installed, but I may have a basic usage confusion.
What I have is a large number of files, hist0000.gif, hist0001.gif, hist0002.gif and so forth, and one mask file MASK.png and I want to generate a set of matching output files OUT001.png, OUT002.png, OUT003.png and so forth, using something like one of these lines
composite hist%04d.gif MASK.png -compose darken "OUT%03d.png"
composite *.gif MASK.png -compose darken "OUT%03d.png"
composite @fname.txt MASK.png -compose darken "OUT%03d.png"
(where fname.txt is a list of the *.gif files, one per line).... but none of these things work. With the new 6.6.3.0 version I don't get an error, but at most I get a single file converted, not the entire set. Any tips on doing this kind of multiple-file processing?
Re: error with multiple filenames
Posted: 2010-07-05T21:41:03-07:00
by fmw42
I think you will have to write a script loop. I don't think IM can process more than one image with a common image in a composite operation. You also left out the -composite. You need
convert oneimage maskimage -compose darken -composite resultimage
see
http://www.imagemagick.org/Usage/compose/#compose
but you can do
convert image1 image2 image3 ... imageN -compose darken -layers merge resultimage
This latter will take the darkest value for each pixel from among each of the N input images.
mogrify will process a whole directory of image, but I don't think it allows a second image in the processing sequence.