You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Kevin Grey <KG...@dynamicsoft.com> on 2002/05/07 09:18:02 UTC

JAI Image Manipulation Task Example

Heya,

	Please comment on the following image manipulation task.  The
operations would be performed depth-first and would pass the resulting image
up the branch to the next element.  This example draws aligned text inside a
rectangle with a transparent background, which is then drawn to the
coordinates (50,50).  The image is then scaled to 10% of its size, rotated
45 degrees, then draws what ends up to be a circle with a diameter of 1
pixel.  It then does some levels adjustments.  I haven't considered stuff
like color balance or composites too much.  Let me know what you think.

<image-manip srcdir="D:/development/jakarta-ant/TEST_IMAGES"
includes="**/*.jpg,**/*.bmp">
	<draw xloc="50" yloc="50">
		<rectangle width="10" height="10" bgcolor="transparent">
			<text align="left" valign="middle" point="10"
string="Hello World"/>
		</rectangle>
	</draw>
	<scale dim="10%x10%"/>
	<rotate angle="45"/>
	<draw xloc="40" yloc="40">
		<scale dim="1x1">
			<circle bgcolor="FF0000" radius="5"/>
		</scale>
	</draw>
	<levels brightness="50" contrast="50" gamma="1.4"/>
	<autolevels/>
</image-manip>

~~K
Kevin Z Grey



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: JAI Image Manipulation Task Example

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Magesh Umasankar" <um...@apache.org>
To: "Ant Developers List" <an...@jakarta.apache.org>
Sent: Tuesday, May 07, 2002 01:43
Subject: Re: JAI Image Manipulation Task Example


> Please provide a use case for an Image Manipulation
> task in a build environment.
>
> Cheers,
> Magesh
>


shrinking down large images to thumbnails, generating an XML list of said
large images and thumbnails then XSLT-ing it into a file.

Batik has an ant task, so they must have found other uses


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: JAI Image Manipulation Task Example

Posted by Magesh Umasankar <um...@apache.org>.
Please provide a use case for an Image Manipulation
task in a build environment.

Cheers,
Magesh

********************************************************
*  Lecture: An art of transferring information from    *
*  the notes of lecturer to the notes of the students  *
*  without passing  through "the minds of either".     *
********************************************************
----- Original Message -----
From: "Kevin Grey" <KG...@dynamicsoft.com>
To: <an...@jakarta.apache.org>
Sent: Tuesday, May 07, 2002 3:18 AM
Subject: JAI Image Manipulation Task Example


>
> Heya,
>
> Please comment on the following image manipulation task.  The
> operations would be performed depth-first and would pass the resulting
image
> up the branch to the next element.  This example draws aligned text inside
a
> rectangle with a transparent background, which is then drawn to the
> coordinates (50,50).  The image is then scaled to 10% of its size, rotated
> 45 degrees, then draws what ends up to be a circle with a diameter of 1
> pixel.  It then does some levels adjustments.  I haven't considered stuff
> like color balance or composites too much.  Let me know what you think.
>
> <image-manip srcdir="D:/development/jakarta-ant/TEST_IMAGES"
> includes="**/*.jpg,**/*.bmp">
> <draw xloc="50" yloc="50">
> <rectangle width="10" height="10" bgcolor="transparent">
> <text align="left" valign="middle" point="10"
> string="Hello World"/>
> </rectangle>
> </draw>
> <scale dim="10%x10%"/>
> <rotate angle="45"/>
> <draw xloc="40" yloc="40">
> <scale dim="1x1">
> <circle bgcolor="FF0000" radius="5"/>
> </scale>
> </draw>
> <levels brightness="50" contrast="50" gamma="1.4"/>
> <autolevels/>
> </image-manip>
>
> ~~K
> Kevin Z Grey
>
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>