Chet Haase wrote:
John,
Also, what release are you using? There was a major fix in
5.0 that eliminated some of the temporary images we used when
loading images through some mechanisms; these temporary images
tended to bloat the footprint way beyond what you could expect.
There may be some paths where we still do this; what methods are you
using to load the images? What images types are you loading?
Guys,
Thanks for the reponses. I'll try to answer best I can (I'm an imaging
newbie, so still coming up to speed on some terminology...perhaps half
my problem? ):
I'm currently using JDK 1.4.2. with JAI 1_1_2_01. I will try to use JDK
1.5 and see if it makes a difference at all.
Regarding tiling, you've only led me to realize I have a lot to learn
:-). Average size of a grayscale TIFF is approximately 350 KB. Average
size of JPEG is around 150-200KB.
Regarding what I'm using to load the images, I'm simply using some
example code I found somewhere in the documentation. My application
only supports TIFFs and JPEGS. In the below code, DocImage is simply
BufferedImage extended with some extra metadata for my use:
public static DocImage readJPEG(File file) throws IOException {
BufferedImage image = null;
DocImage rImage = null;
image = ImageIO.read(file);
if (null!=image) {
rImage = DocImage.convertToDocImage(image);
rImage.setImageType("JPEG");
}
return rImage;
}
public static DocImage readTiff(File file) throws IOException {
BufferedImage image = null;
DocImage rImage = null;
FileSeekableStream stream = null;
stream = new FileSeekableStream(file);
ParameterBlock params = new ParameterBlock();
params.add(stream);
TIFFDecodeParam decodeParam = new TIFFDecodeParam();
decodeParam.setDecodePaletteAsShorts(true);
RenderedOp image1 = JAI.create("tiff", params);
image = image1.getAsBufferedImage();
if (null!=image) {
rImage = DocImage.convertToDocImage(image);
rImage.setImageType("TIFF");
}
return rImage;
}
Thanks for your help. If I can provide any further info that might help
you make sense of my problem, please let me know.
Thanks!
John
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".