Let User Drag to Re-Size Image

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi there,
I was wondering if there is a way to allow the user to resize an image by
clicking and drawing on of the four corners of the image..
thanks
 
Quick answer: Sort of.

Background: An image in an HTML document is actually a reference to the URL
where the image can be downloaded FROM. The image itself is not IN the HTML
document. So, while you can use client-side JavaScript to change the image
tag attributes (height and width) it is not really resizing the image. It is
resizing the display of the image in the HTML document. To actually resize
the image, you would have to do one of the following:

1. Make a new Request for the image to an ASPX page that can resize the
actual image on the server and return the resized image to the client.
2. Use a client-side ActiveX Control, Java applet, etc., to literally resize
the image on the client.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 
I'm sure there is no way to do it using asp.net technology since its server
side..and what you need is client side functionality
 
asp.net lets you do all the html and javascript code for the client side
scripting... so there has be to a way..

if i just resize the image of the actual picture, would that still work
easilty enough, or would it end up too pixely??
 
I was mainly referring to the drag and drop stuff when I said it can't do
the drag and drop stuff. I'm sure you can do something like that with some
DHTML.
To do this, you might have to pass the size of the image you selected to
the server using asp.net. and probably mess with some GDI+ to do some
dynamic image processing. Then send this back out to the browser. Seems
like nice little project..good luck. BTW. Kevin's idea would probably work
out too.
 
pretty simple in javascript. script can change the pixel size of the image,
and the browser will resize it. you will want the original image to have
enough pixels to scale nicely (use html to scale down originally)

-- bruce (sqlwork.com)


| Hi there,
| I was wondering if there is a way to allow the user to resize an image by
| clicking and drawing on of the four corners of the image..
| thanks
| --
| (e-mail address removed)
 
Back
Top