This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Zooming in on a picture?  RSS feed

 
Gary Bryan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am making a program which involves zooming in on a picture made out of an Image and several shapes drawn on using Graphics methods, where a JSlider is used to change the magnification, and the picture is on a JPanel subclass. I have written a zoom method, which works but is very slow and often causes the computer to run out of memory, especially when zooming in on images larger than about 200x200, with a magnification of over 3x. Here is the code (toDraw is an Image of what is currently on the display, and is painted onto the screen in the paint method):

Is there any way I could change this to make the zooming a lot faster?
Thanks.
[ June 30, 2003: Message edited by: G Bryan ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!