Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Java
Out of memory with BufferedImage
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="iamfractal, post: 567472"] Hi, folks! I have a BufferedImage onto which I'm drawing simple lines and polygons, but I want to allow the user to magnify the final graphic and allow, "Zooming-in," on a choice line or polygon. To cater for this magnification, I'd like the graphic to be placed in a JScrollPane, so that, as the user zooms, the graphic can be dragged about. My problem is that, as I magnify, I must double the size of the BufferedImage each time and draw the lines and polygons twice as big; but after a couple of magnifications, the BufferedImage throws an OutOfMemory exception. Is there a simple way to create allocate memory for only a particaly part of a BufferedImage, rather than for the whole thing? (I want neither to use the Image.getScaledInstance() to zoom-in (because of pixellation), nor to increase heap-size to allow for monster BufferedImages.) Thanks, ..ed [URL="http://www.EdmundKirwan.com"]www.EdmundKirwan.com[/URL] [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Java
Out of memory with BufferedImage
Top