You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-dev@jakarta.apache.org by Abey Mullassery <ab...@mullassery.com> on 2003/09/26 18:16:15 UTC

ImageTag samples

Hi,

For those who do not want to install the WAR file but would still like to
see the output of the examples, I have uploaded it to my website (Remember
that these are the saved output files and are not dynamic anymore).

1. Overlay/ write Text on a Cropped image after Resizing (JPEG)

<img:image src="/images/splash.jpg" name="gs.jpg" refresh="true" >
  <img:crop x="0%" y="25%" width="100%"	height="30%"/>
  <img:resize scale="200%"/>
  <img:text text="A part of the Jakarta Tag library" x="2" y="95%"
font="Arial" bold="true" size="16" color="0x440000"/>
</img:image>

Output : http://www.mullassery.com/gen-images/gs.jpg


2. Rotation after Resizing (GIF converted to PNG)

<img:image src="/images/new.gif" name="sr.png" refresh="true">
	<img:resize scale = "80%" />
	<img:rotate degrees="-30" />
</img:image>

Output : http://www.mullassery.com/gen-images/sr.png


3. A colored Border to an image with an image (the one generated above)
Overlaid.
The white background is set as the transparency color (JPEG)

<img:image src="/images/splash.jpg" name="brdr.jpg" refresh="true" >
  <img:border width="10" height="5" color="0x44dd44" />
  <img:overlay x="5%" y="50%" name="sr.png" color="0xffffff" tolerance="35"
/>
</img:image>

Output : http://www.mullassery.com/gen-images/brdr.jpg


4. Overlay a transparent image on a Grayscaled image and Resized (PNG on
JPEG)

<img:image src="/images/splash.jpg" name="gr.jpg" refresh="true"
imagingType="JAVA2D">
  <img:grayscale/>
  <img:overlay x="2%" y="2%" src="/images/new.png" />
  <img:resize scale = "70%" />
</img:image>

Output : http://www.mullassery.com/gen-images/gr.jpg


Eagerly awaiting your comments.

Regards,

Abey Mullassery
http://www.mullassery.com