aspose file tools*
The moose likes Beginning Java and the fly likes Single image file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Single image file " Watch "Single image file " New topic
Author

Single image file

Larry Lai
Ranch Hand

Joined: May 13, 2002
Posts: 44
Hi guy,
One question I want to ask is 'How can the application display a single image file (without making multiple copies) into different size?'
It's because I design an application showing a image and the users can choice the image size with different size(eg. small middile and large).
If anyone doesn't understand my question, I would explain more details as well.
thanks
Larry
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Note that the drawImage method of the Graphics class is overloaded - a couple versions of which allow the programmer to specify a dimension (which would seem to be exactly what you want to do). Take a look at The Graphics Class Documentation.
Good Luck.


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Single image file