Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Single image file

 
Larry Lai
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic