how to manage max size of BufferedImage?

Hi,if the size of BufferedImage (width*height) more then defined size (about 15 000 000) there is out.of.memory error and no exception .Does anybody know how to increase and manage this limit? For the java virtual mashine is 500 MB reserved.Thanks and Regards.
[295 byte] By [007@007] at [2007-9-30 21:30:16]
# 1

You can use the -Xmx option to assign a larger max memory usage, but that sounds like a pretty big image to be playing with. Maybe you need to investigate other schemes for image management if you really need something that large. I imagine that even Photoshop doesn't truly hold that large an image in memory, but has some scheme to maintain in memory only what is needed to show on the screen.

bsampieri at 2007-7-7 3:02:13 > top of Java-index,Desktop,Core GUI APIs...
# 2

thanks, the problem that such image (square about 10 000 000 (width*height)) fo example will take about 30Mb of memory, but by saving in jpeg it will take only 200-300 kB (these images are diagrams).

So the problem is only to increase the size of BufferededImage during the building of diagram, after saving it will take a little of memory.

Thanks and Regards,

007@007 at 2007-7-7 3:02:13 > top of Java-index,Desktop,Core GUI APIs...
# 3
Hello,I am certainly no expert on the matter but in the past I used JAI (java advanced imaging). This api provides renderable operators that might come in handy in such cases.
weebib at 2007-7-7 3:02:13 > top of Java-index,Desktop,Core GUI APIs...
# 4
Thanks.
007@007 at 2007-7-7 3:02:13 > top of Java-index,Desktop,Core GUI APIs...
# 5

Yeah, well, it doesn't matter that you can store it as JPEG or PNG or whatever as only a few hundred KB. You aren't manipulating that in memory, you're manipulating the raw image. So certainly see what the JAI package offers, otherwise you'd have to read a bit on general image manipulation (I'm sure there's books on that subject), most of which wouldn't have much to do with Java specifically.

bsampieri at 2007-7-7 3:02:13 > top of Java-index,Desktop,Core GUI APIs...