Path in batchfiles to pictures

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
Albireo
Posts: 68
Joined: 2010-01-12T03:32:23-07:00
Authentication code: 8675309

Path in batchfiles to pictures

Post by Albireo »

Hello!
I have write two batchfiles with ImageMagick commands.
This work for me!

Code: Select all

convert thumbnail.gif -matte -virtual-pixel transparent -channel A -blur 0x8 -level 0,50% +channel soft_edge.png
But - When I add a path to the filename

Code: Select all

convert "c:\temp\pic\thumbnail.gif" -matte -virtual-pixel transparent -channel A -blur 0x8 -level 0,50% +channel "c:\temp\pic\soft_edge.png"
I get the following error message:
convert: option requires an argument '-level' @ convert.c/ConvertImageCommand/1708.

Can I choose the library for the infile and outfile in ImageMagick?

//Jan
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Path in batchfiles to pictures

Post by fmw42 »

try using the full path from root

or

try

-level "0,50%"

see http://www.imagemagick.org/Usage/windows/ for windows specific issues regarding escape characters and special characters
Albireo
Posts: 68
Joined: 2010-01-12T03:32:23-07:00
Authentication code: 8675309

Re: Path in batchfiles to pictures

Post by Albireo »

Thank You!
but my problem still exist.
fmw42 wrote:try using the full path from root
I think it is the whole path in Windows.
fmw42 wrote:Try -level "0,50%"
I tested this, but I think the problem still exists in the path because it is the only thing that is differ in the examples.
Find nothing about "the path" to the images.

//Jan
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: Path in batchfiles to pictures

Post by el_supremo »

In a batch file you have to double the percent signs or they will be stripped
-level 0,50%%

I don't know what's wrong with the path. I've tried it in a batch file and works fine.

Pete
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
Post Reply