Hi,
The 'convert "*.tif" -thumbnail 250x90 -unsharp 0x.5 "output\*.jpg"' command line return "unable to open image `output\*-0.jpg': Invalid argument".
I can't find any post or manual entry regarding why the error and why:
- The convert error
- It is trying to add the "-0" sufix to the filename
I'm using 6.4.2-5 version on Windows XP.
Thank you
Rui Gomes
Using wildcards from tif to jpg
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Using wildcards from tif to jpg
convert syntax does not allow * wildcards (as far as I know)
You can use %d in output file names.
See
viewtopic.php?f=1&t=6480&hilit=wild+card
http://www.imagemagick.org/Usage/files/#write_seq
You can use mogrify.
See
http://www.imagemagick.org/Usage/basics/#mogrify
You can use %d in output file names.
See
viewtopic.php?f=1&t=6480&hilit=wild+card
http://www.imagemagick.org/Usage/files/#write_seq
You can use mogrify.
See
http://www.imagemagick.org/Usage/basics/#mogrify
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Using wildcards from tif to jpg
In the output format!!!!! In input it supports ~, * and ? wildcard meta characters. It alsi supports a Im specific wildcard @ to read a list of images from a file.fmw42 wrote:convert syntax does not allow * wildcards (as far as I know)
In both Input and ouptut, %d can be used, though will be added automatically as -%d before the suffix if the image format does not support multiple images per file (-adjoin which is enabled by default).
See IM examples, Writing Multiple Image Files
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Using wildcards from tif to jpg
anthony wrote:In the output format!!!!! In input it supports both * and ? wildcard meta characters.fmw42 wrote:convert syntax does not allow * wildcards (as far as I know)
See IM examples, Writing Multiple Image Files
Can you clarify the use of * and ? for input or point me to examples on your pages?
Thanks.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Using wildcards from tif to jpg
Image File Handling, Reading Images
http://www.imagemagick.org/Usage/files/#read
It is done because the DOS shell does not expand those characters, so IM has to support at least that minimal requirement!
Shell expandsion under more advanced shells like BASH, CSH, TCSH, KSH etc also allow the use of [...] character alternatives and {..,..,..} string alternative expansion too. IM does not, though it has its own [...] read modifiers. See the above link.
In fact everything in this discussion is in that page of IM Examples!
http://www.imagemagick.org/Usage/files/#read
It is done because the DOS shell does not expand those characters, so IM has to support at least that minimal requirement!
Shell expandsion under more advanced shells like BASH, CSH, TCSH, KSH etc also allow the use of [...] character alternatives and {..,..,..} string alternative expansion too. IM does not, though it has its own [...] read modifiers. See the above link.
In fact everything in this discussion is in that page of IM Examples!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Using wildcards from tif to jpg
I used wildcards on input files and d% option on output.
I made several tests and I never got an output file equal than input.
I found another posts with the same problem, but with no anwsers. I look on IM examples but, sorry, I can't find how can I get equal input and output filenames.
Is there any way to do this in DOS shell?
Thanks
I made several tests and I never got an output file equal than input.
I found another posts with the same problem, but with no anwsers. I look on IM examples but, sorry, I can't find how can I get equal input and output filenames.
Is there any way to do this in DOS shell?
Thanks
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Using wildcards from tif to jpg
At this time only mogrify allows you to save a file to the same input filenamerpgomes wrote:I used wildcards on input files and d% option on output.
I made several tests and I never got an output file equal than input.
with only a directory or suffix change.
Convert does not have the ability to use say '%s' to specify the original basename
of the image
The only way is to DIY it using a wrapping shell, or other program (like PHP)I found another posts with the same problem, but with no anwsers. I look on IM examples but, sorry, I can't find how can I get equal input and output filenames.
See example for UNIX shells in Mogrify, Batch Processing Alternatives
For DOS you will need to find someone more familiar with its scripting methodology.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Using wildcards from tif to jpg
+1 this would be very useful to use with wildcardsanthony wrote:rpgomes wrote:I used wildcards on input files and d% option on output.
[...]
Convert does not have the ability to use say '%s' to specify the original basename
of the image
[...]
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Using wildcards from tif to jpg
fkjt79 wrote:+1 this would be very useful to use with wildcardsanthony wrote:rpgomes wrote:I used wildcards on input files and d% option on output.
[...]
Convert does not have the ability to use say '%s' to specify the original basename
of the image
[...]
Sorry I am wrong - and my own examples prove it.
You can use the input filename (basename, or whatever), but you have to 'prepare' IM to do so as a security measure.
See http://www.imagemagick.org/Usage/files/#save_escapes
Also see Using Convert Instead of Morgify
http://www.imagemagick.org/Usage/basics ... fy_convert
Mogrify does this automatically, but works on one input image file at a time. Convert however reads all the input images first and then processes them.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/