ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jakob Fix <jakob....@gmail.com>
Subject problem with apply task
Date Thu, 22 Sep 2005 08:22:00 GMT
Hello,

I am trying to use ant to run ImageMagick's composite command over a
fileset, like this:

<project default="watermark" name="watermark-files" basedir=".">
  <property name="in.dir" value="./in"/>
  <property name="out.dir" value="./out"/>
  <property name="wm.image" value="watermark.png"/>

  <target name="watermark" description="watermark all files">
    <apply executable="composite.exe" dest="${out.dir}">
    <arg value="-dissolve 40%"/>
    <arg value="-tile ${wm.image}"/>
    <srcfile/>
    <targetfile/>
    <fileset dir="${in.dir}" includes="*.png"/>
    <mapper type="glob" from="${in.dir}/*.png" to="${out.dir}/*.png"/>
    </apply>
  </target>
</project>

The commandline for the composite command is this, which I know works:
> composite -dissolve 40% -tile watermark.png in/hsc-c0311d.png out/hsc-c0311d.png

When running the ant file, I get these error messages:

watermark:
    [apply] Current OS is Windows 2000
    [apply] hsc-c0311d.png skipped - don't know how to handle it
    [apply] hsc-c0311e.png skipped - don't know how to handle it
    [apply] hsc-c0311f.png skipped - don't know how to handle it
    [apply] hsc-c0312.png skipped - don't know how to handle it
    [apply] hsc-c0601.png skipped - don't know how to handle it

I tried running the same with the -v and the -d flags, but it's not
telling me anything more than this.  I was hoping for some kind of
summary of the commandline to be executed (like I've seen for the java
task).

Could someone please point out to me what I'm doing wrong? It would be
so great if I could batch watermark all these image files using ant.

Thanks in advance,
--
cheers,
Jakob.

PS: Oh, I am using ant 1.6.1 on Windows 2000.

C:\tools\watermark>ant -version
Apache Ant version 1.6.1 compiled on February 12 2004

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message