Zoonm In&out JPEG&GIF images

asukai
asukai used Ask the Experts™
on
Can anyone please tell me how to do Zoom In&out for JPEG&GIF files?  Do I use RescaleOp? If so what’s the parameters. I know how to brighten and darken images but not scale up or down.


Thanx,

asukai
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Java Developer
Top Expert 2010
Commented:
Depends if you want to scale the actual image, or just paint the image at a different scale.

To paint the image simply use the appropriate drawImage() method.
Or you can set the scaling used by the graphics context:
http://java.sun.com/docs/books/tutorial/2d/display/transforming.html

here's an example usding rescaleop:
http://java.sun.com/j2se/1.3/docs/guide/2d/samples/Rescale.java

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial