net.uworks.andariel
Class ImageInfo

java.lang.Object
  extended byorg.apache.tools.ant.ProjectComponent
      extended byorg.apache.tools.ant.Task
          extended bynet.uworks.andariel.ImageInfo

public class ImageInfo
extends org.apache.tools.ant.Task

Task definition for an ANT task that extracts information from an image file.


 Usage:

   Task declaration in the project:
   
     <taskdef name="imageinfo" classname="net.uworks.andariel.ImageInfo" />
   

   Task calling syntax:
    
     <imageinfo name="file" [outputwidth="widthproperty"] [outputheight="heightproperty"] />
    


   Attributes:
       file            -> The filename or URL of the image
       outputwidth     -> The name of the property to store the image width
       outputheight    -> The name of the property to store the image height


 Crude Example:

     
     <imageinfo name="test.jpg" outputwidth="imagewidth" />
     

 

Since:
Ant 1.5
Version:
$Revision: 1.0 $
Author:
Josep del Rio

Field Summary
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
ImageInfo()
           
 
Method Summary
 void execute()
          Execute this task.
 void setFile(java.lang.String file)
          Set the filename or URL of the image we want to check.
 void setOutputheight(java.lang.String outputheight)
          Defines what property do we use to store the image height.
 void setOutputwidth(java.lang.String outputwidth)
          Defines what property do we use to store the image width.
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageInfo

public ImageInfo()
Method Detail

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Execute this task.

Throws:
org.apache.tools.ant.BuildException - Description of the Exception

setFile

public void setFile(java.lang.String file)
Set the filename or URL of the image we want to check.

Parameters:
file - the filename or URL.

setOutputwidth

public void setOutputwidth(java.lang.String outputwidth)
Defines what property do we use to store the image width.

Parameters:
outputwidth - the name of the property to place the image width.

setOutputheight

public void setOutputheight(java.lang.String outputheight)
Defines what property do we use to store the image height.

Parameters:
outputheight - the name of the property to place the image height.