[JAVA2D] Strategies to manage BufferedImage size
First of all, hello. I'm new to the list. First post.
I'm working on an application that reads a BufferedImage from a variety
of sources and allows a user to either scale the image with
AffineTransformOp or brighten/darken it with RescaleOp.
I keep two copies of the image in memory...the original and the modified
version. I keep the original because I was never really able to get an
image to revert to it's normal state after being reduced in size with
the AffineTransform. I suspect this is because of some matrix algebra
that I don't understand fully, but I simply found it easier to just
reset to the original image before trying another operation.
Anyway, I'm running into problems when I zoom around 5 levels because
I'm overrunning the allocated memory for the stack. I've written one of
my test images to file at its largest size and it's around 9.3 mb. I'm
very interested in keeping my applications footprint as small as
possible, so this is simply not good.
So, I have a few questions.
1. Am I correct in assuming I need to keep the original around after
zooming/shrinking to provide accurate contrasting operations?
2. Are there any strategies for reducing the size of a BufferedImage
that I might not be aware of?
Thanks for any information you provide, whether links, pointers to
books, or first-hand experience. It will be very much appreciated.
To unsubscribe, send email to email@example.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
firstname.lastname@example.org and include in the body of the message "help".