« Return to Thread: how to resize image returned from dwr call bufferedImage

how to resize image returned from dwr call bufferedImage

by ddduuu :: Rate this Message:

Reply to Author | View in Thread

Hi, all,
I can successfully display the images returned from dwr call as bufferedImage which is retrieved from database, my problem is that the image is too big to fit my javascript window, I want the image exactly to fit the window, and resize with the window on the browser without going back to call dwr java function again to recalculate, so I mean my javascript program can recalculate the size of the image, with setup like this:

img src="day1.jpg" title="day1.jpg." style="width: 115px; height: 126px; visibility: hidden;"

I can do that with javascript, but with the dwr retrieved image like this:

img id="image-day1.jpg" src="/webapp/dwr/download/10ED6EDB38A3C797840F9AB2E2764FD2" title="day1.jpg"

I can not set style with the size, if I do, it will not display the image anymore.

Any suggestions for me in terms of what to do to resize it with javascript?

Thanks in advance.

Dave

 « Return to Thread: how to resize image returned from dwr call bufferedImage