This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Java Micro Edition and the fly likes Image resizing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Image resizing" Watch "Image resizing" New topic
Author

Image resizing

saad sal
Greenhorn

Joined: Jul 31, 2005
Posts: 25
What i would like to know is whether we can resize a picture on a canvas screen. I have an Image object. I display it on the canvas. Now when the user presses a button, i want the image to zoom in. Is there any way to zoom in the image.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17258
    
    6

There are ways to resize the image. However, you should note that the new image will not have a transparency background. It becomes an immutable image and if you had a transparency set before, it gets lost.

I don't remember the specific code to do this, but know that I got it here in this forum. So do a search above for "resize image" and I am sure you will find that thread.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Image resizing