How can i improve image quality on resizing it by mouse dragging.

I need to do this using javascript. Can we achieve this using some scale factors. I have no idea. Any help will be greatly appreciated

Please let me know in this.

Thanks in advance

only if the original image is as large as the largest dragable size.
increasing the size of the image beyond its actual size creates interpolated pixels, 'best fit of color' that may not be correct or creates visual pixels that are multiple screen pixels in size, 'blocky' images.
If the image is initially served at a small size,
a larger image can be background loaded by a script,
page times are not impacted,
the effect can be seamless.
example code only, not checked or correct
where "onresize" is some defined action havent bothered to code

<script type='text/javascript'>
function imageload() { something to load hi res images }
function onresize() {something to handle image dragging}
<body onload='imageload()'>
<img src='thumbsize.jpg' onresize='self.src="fullsize.jpg"' alt='drag to resize image'>