Skip to main content

zoom in and out of image

1 reply [Last post]
Joined: 2006-07-20

Hi guys,

I am looking for an example or ideas to zoom in and out of images using LWUIT. I am presently using the MoitonComponent example to scroll through it . Can someone help me with some pointers to zoom in and out.

thanks in advance


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2010-01-06


I'm working on an application and I use zoom.

I can say that zoom in and out an image is really a problem if your image isn't really small.

You can read about this in this topic I opened:

You can use the scaled() method of the image object, that returns a scaled copy, with the width and height that you desire, of your image. The problem is that this method is not efficient and uses a lot of memory. Watch your memory usage and, if it's valid for you, use this method.

I was tryint to scale a big image, so finally I have had to store three copies of my image in the disk, each one of a different size (100%, 50%, 25%), loading the image that I want when needed.