OutOfMemoryException
Hi,
I have written code for web base image viewer to performed some basic operations like zoom,rotate ,brightness.
For that i have one class. I am calling this class methods for particular operation .Then taking modified image in buffered image.
But main problem is that when i performed operation i am getting OutOfMemoryException .
I am not getting anything how to solved this problem.
If any body have solution please reply ASAP.
Thanks In Advance
[493 byte] By [
AP_javaa] at [2007-11-27 2:27:54]

# 2
Hi,
Thanks for u r reply.Here i am sending u code which i have written to performed image operation e.g.
Here i am passing operation value through hidden field also file name.
Also browser does not display TIFF image directly so i am converting this image in to PNG format .bi is object of bufferedImage which is TIFF image converted in PNG then converted in bufferedImage .myBrightness is method for performing desire operation. I am getting result in bufferedImage format but when i convert (write back)in PNG file then it goes in out of memory.
if(obj4.equalsIgnoreCase("brightness")){
if(brightnessFactor!=10){
brightnessFactor=brightnessFactor+1;
float c=1.0f;
//bi=new DemoSimpleContrastOperator().brightness_new(bi,1.0f);
bi=new DemoSimpleContrastOperator().myBrightness(c,brightnessFactor,str);
dest="c:\\rotate11.png";
format="png";
RenderedOp op = JAI.create("filestore", bi,dest, format);
// str=outputFile.toString();
str=dest;
flag2=1;
System.out.println("BrightnessFactor="+brightnessFactor);
}else{
brightnessFactor=1;
System.out.println("Else of bright");
}
}else{System.out.println("In brightness else method");}
This is my sample code. please reply immediately.
Thanks once again for previous reply
Waiting for u r reply
Tanks in Advance