Page 1 of 1

Issue/improvement - Processing '@list of files' on DOS/win

Posted: 2012-04-17T07:29:03-07:00
by Djonatah
Hi,

I am pretty new at image magick, but i think there's a limitation when using a list of files with mogrify. I want to convert files in a different machine, and in order to do that it is given me a list of files, but mogrify can't find the list using the '@' operator. Take a look at my commands below:

Code: Select all

"\\server\ImageMagick\ImageMagick-6.7.5-10\mogrify.exe" -type bilevel -monochrome -compress group4 "\\server\MyFolder\out - files\@list.txt"
This command throw this error:
I get this erro: mogrify.exe: unable to open image `\\server\MyFolder\out - files\@list.txt': No such file or directory @ error/blob.c/OpenBlob/2614.
and I also tried this way:

Code: Select all

"\\server\ImageMagick\ImageMagick-6.7.5-10\mogrify.exe" -type bilevel -monochrome -compress group4 @"\\server\MyFolder\out - files\list.txt"
But it doesn't work either..
mogrify.exe: unable to open image `@\\server\MyFolder\out - files\list.txt': No such file or directory @ error/blob.c/OpenBlob/2614.
Let's assume I am running this command from my c:\, so I can't run a "remote" list of files from my current working path. I's it a bug? or a possible improvement?

Thanks

Re: Issue/improvement - Processing '@list of files' on DOS/w

Posted: 2012-04-17T18:06:45-07:00
by anthony
The '@' only works if it is the FIRST character. You can not prefix a path to it!

As for your second example failing. I have no idea.

Re: Issue/improvement - Processing '@list of files' on DOS/w

Posted: 2012-04-18T05:29:44-07:00
by Djonatah
So this IS a bug or more likely a limitation, right?

Could this be added to the TODO list?

Thanks

Re: Issue/improvement - Processing '@list of files' on DOS/w

Posted: 2012-04-18T19:42:55-07:00
by anthony
I would first simplify the problem.

Does it would for a filename in the current directory?
How about one directory down?

Basically it (as in "@filename" as the whole argument) should work!

Re: Issue/improvement - Processing '@list of files' on DOS/w

Posted: 2012-04-20T05:12:48-07:00
by Djonatah
I tried both

Code: Select all

"mogrify.exe" -type bilevel -density 600x600 -resize 3300x900 -monochrome -compress group4 @".\out - test2\list.txt" 
and

Code: Select all

"mogrify.exe" -type bilevel -density 600x600 -resize 3300x900 -monochrome -compress group4 @"out - test2\list.txt"
But none of them worked with the @ operator (JFY: i tried editing the list file in the DOS editor, and it worked fine acessing the files from my current working directory).

Re: Issue/improvement - Processing '@list of files' on DOS/w

Posted: 2012-04-22T21:06:20-07:00
by anthony
Can you try a directory without spaces in the name?

Perhaps that is to cause of the bug

Re: Issue/improvement - Processing '@list of files' on DOS/w

Posted: 2012-04-24T12:47:50-07:00
by Djonatah
Even if there is no space in the path, the @ operator does not work...
convert.exe: unable to open image `@.\out\list.txt': No such file or directory @ error/blob.c/OpenBlob/2614.
convert.exe: unable to open image `@out\list.txt': No such file or directory @ error/blob.c/OpenBlob/2614.

Re: Issue/improvement - Processing '@list of files' on DOS/w

Posted: 2012-04-25T18:56:50-07:00
by anthony
This also fails under UNIX

Code: Select all

convert @/home/anthony/t -append show:
convert: unable to open image `@/home/anthony/t': No such file or directory @ error/blob.c/OpenBlob/2617.
But this works (in the current directory)

Code: Select all

convert @t -append show:
Perhaps this a security measure to ensure a 'cracker' not include confidential information into an image via a PHP or CGI image processing web application. I have put in a request to see if this is the case.

EG: prevent something like this to get the web server setup info!
convert label:@/etc/httpd/conf/httpd.conf .....

'@' file inclusion can be dangerous, and may need to be restricted only to commands that have it specifically enabled by some type of special option. I'll have to think about this for IMv7, though this may not apply to 'piped' inclusions.