[solved] Trouble with Filename Reference in .txt

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
wKad

[solved] Trouble with Filename Reference in .txt

Post by wKad »

Hi

Using Win XP SP3; ImageMagick-6.5.2-4;

I can't reference files with @file.txt, with a file like this:

l.txt:

Code: Select all

a.jpg
b.jpg
c.jpg
and the command:

Code: Select all

convert @l.txt abc.pdf
While in ImageMagick-6.5.1-6, the command works, giving a 3-page .pdf file, now in ImageMagick-6.5.2-4, I get the following:

Code: Select all

convert: unable to open image `a.jpg[⌂☻]': Invalid argument @ blob.c/OpenBlob/2489.
convert: unable to open image `b.jpg[⌂☻]': Invalid argument @ blob.c/OpenBlob/2489.
convert: unable to open image `c.jpg[⌂☻]': Invalid argument @ blob.c/OpenBlob/2489.
convert: missing an image filename `abc.pdf' @ convert.c/ConvertImageCommand/2775.
Same .txt file, same .jpg files, just different versions;

I also noted some strange behavior using the *:

Code: Select all

convert *.jpg asterisk.pdf
Works fine in 6.5.1-6, but in 6.5.2-4, despite the output .pdf file being ok, the following message is displayed:
convert: unable to open image `some folder\': No such file or directory @ blob.c/OpenBlob/2489.
In both versions, I have a folder named "some folder" in the same directory I have convert.exe and the .jpg files;

6.5.1-6 Works perfectlly for me, except for one fact... When using @ to reference files, I can't reference files with a blank space in the filename (" "), but I also can't reference then with quotes in the file. I mean, a file like

file1.txt:

Code: Select all

c:\some-image-1.jpg
c:\some-image-2.jpg
c:\some-image-3.jpg
Works fine;

file2.txt:

Code: Select all

c:\some image-1.jpg
c:\some image-2.jpg
c:\some image-3.jpg
Don't work, because of the blank spaces;

file3.txt:

Code: Select all

"c:\some-image-1.jpg"
"c:\some image-2.jpg"
"c:\some image-3.jpg"
Also don't work; In the first file, IM seem to ignore the first quote, and thinks the last quote is part of the filename. So, it try to find the file c:\some-image-1.jpg", and fails; for the other files, it fails because of the blank space, since the first quote was ignored.

That is the reason I need to update the version, but the current not even works with the file1.txt... This was a change in the sintax, maybe? I don't find any documentation of this in the site.

On the other hand, the sintax:
convert c:\a%d.Jpg[1-6] c:\as.pdf

Works well in both versions. But I can't use this method, because the filenames I target are something like:

Code: Select all

c:\a1 z1.jpg
c:\a1 z2.jpg
c:\a2 z1.jpg
c:\a3 z1.jpg
c:\a4 z1.jpg
c:\a4 z2.jpg
c:\a4 z3.jpg
c:\a5 z1.jpg
As I have two "index" in each file, with the second varying for each first index, I guess this sintax will give me more work than benefits...

Thanks for the attention
Last edited by wKad on 2009-05-18T07:47:23-07:00, edited 1 time in total.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Trouble with Filename Reference in .txt

Post by magick »

We can reproduce the problem you posted and will have a new point release out with a fix in just a few days. Thanks.
wKad

Re: Trouble with Filename Reference in .txt

Post by wKad »

Thanks =)

--
Edit:
Works fine with ImageMagick-6.5.2-5
Post Reply