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

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
Djonatah
Posts: 4
Joined: 2012-04-17T07:16:11-07:00
Authentication code: 13

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

Post 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
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

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

Post 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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Djonatah
Posts: 4
Joined: 2012-04-17T07:16:11-07:00
Authentication code: 13

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

Post by Djonatah »

So this IS a bug or more likely a limitation, right?

Could this be added to the TODO list?

Thanks
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

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

Post 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!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Djonatah
Posts: 4
Joined: 2012-04-17T07:16:11-07:00
Authentication code: 13

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

Post 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).
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

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

Post by anthony »

Can you try a directory without spaces in the name?

Perhaps that is to cause of the bug
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Djonatah
Posts: 4
Joined: 2012-04-17T07:16:11-07:00
Authentication code: 13

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

Post 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.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

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

Post 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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply