I found this code somewhere on Internet. I use this code in my web application. No problem when using this BUT it slow on rendering the image. How do I increase the performance? Is there a way to enhance this method?
Here is the code: (for someone who need it, just put to your application and run it)
Define "slow". I've used similar code to generate on-the-fly thumbnails for my personal web site and it worked fine. Have you profiled your app to make sure this is where the bottleneck is? Is your hardware maxed out (i.e. the CPU or disk utilization is 100%)? Unfortunately, image processing in Java is pretty much a black box. There isn't much we can do programmatically to influence its behavior.