Only 44 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!

Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Zooming in on a picture?  RSS feed

Gary Bryan
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?
[ June 30, 2003: Message edited by: G Bryan ]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!