I have an imaging program that uses JAI extensivly and I was wondering if there are any "proper" coding techniques when using JAI that handle memory management, running time etc...
I am loading, adjusting brigheness, contrast, adding border, and saving an image. How I am doing this currently is I have a static class that has methods such as jaiLoad, jaiBrightness, jaiContrast, jaiBorder etc. and I am just running them 1 after another.
The problem comes when I start to perform many operations, I start to get out of memory errors, long execution time etc.
Is there a way to combine multiple JAI operations into 1 parameter block?
Is there any way to minimize the amount of memory a RenderedOp takes up?
Should I be using BufferedImage's or RenderedOp's?
I have searched and searched the web for good JAI resources but there seems to be none. I think when I figure out all of this I might dedicate a website to JAI.
Resources, tips, code snipplets would all help!
P.S. Please no suggestions about setting the JVM memory (eg. -Xmx, -Xms)