crop image

Hi, guys..

I will make a client-server application using j2me and servlet. Servlet will send an png image as a response to j2me. The servlet's actions about the request are:

1. servlet will put a small circle image in some parts of the main image, then

2. servlet will crop part of the main image as client request then send it to client.

I get trouble to put the small circle image to the main image and crop the main image. Could somebody help me about the algorithm or source code?

Thanx..

[530 byte] By [claudia168a] at [2007-10-2 20:36:15]
# 1

Look at JAI

composte descriptor for adding circles to the image

http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/operator/CompositeDescriptor.html

crop operator for cropping the image

http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/operator/CropDescriptor.html

Might be overkill for your application though

matfud

matfuda at 2007-7-13 23:19:27 > top of Java-index,Other Topics,Algorithms...