简体   繁体   中英

How to resize GWT image generated from servlet?


I have a servlet that generates PNG using data in database...then in my GWT Application i use the servlet URL to get the image, all of this work perfectly, but the problem is i can't modify the size of image to fit the box reserved to it since the image is generated from servlet.Is there a method to modify dimensions when generating image? or may be client side solution to setup image's size? Any ideas how I'd do this? Thanks in advance,

I am assuming you are loading it in a gwt Image widget. If so, just use the widget functions of setWidth( "10px") and setHeight( "10px") on the client side.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM