tags:

views:

46

answers:

5

i am trying to resize a image by 50% how would i be able to do that can some one lead me the the right path please

Thank You

+2  A: 

Use JQuery Image Resize Plugin
Also, you can find a good documentation here

Kamyar
+2  A: 

Resizing an image on the client side is bad idea if you will only display the image at a reduced size. Their computer downloads the entire image. Resize on the backend. A good program to resize with is imagemagick. Additionally most browsers do a bad job resizing images. Programs like imagemagick use better algorithms. (Though I heard recently that some newer browsers are getting much much better at it.)

Plaudit Design - Web Design
There are reasons to do it on the client side you know
drachenstern
+2  A: 
<img src="someimage.jpg" id="image" />

jQuery:

$('#image').css({
  width: '50%',
  height: '50%'
});
Harmen
+1  A: 

You can use jQuery's animate method:

.animate({width: maxWidth})
Abe Miessler
A: 
Gabriel