Hi
I had to solve that kind of problem once.
Since I used a server without any native graphics resource (headless server), I choosed to use
PJA Toolkit but you probably don't need it.
Anyway, you will find a sample code about how to generate a compressed picture (thumb) in this
java class using extra API such as
java.awt,
javax.swing,
com.sun.image.codec.jpeg etc..