O'Reilly logo

jQuery 1.3 with PHP by Kae Verens

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Resizing

OK. Now, let's do some more manipulating tasks. Here's another simple one.

For resizing, let's keep it simple. We will show the current size in pixels, and let the client change the height or width. We will keep the aspect ratio of the original, so the image does not get skewed.

Even with that, there is still some subtle trickiness to this. The problem has to do with the order of effects. We always build up our sample image by starting with the original untouched image, but if you resize an image to 640x480 and then rotate it 90 degrees, the effect is very different from rotating 90 degrees first and then resizing to 640x480.

On the server side, we always want to carry out the effects in the same order, but on the client side, we need ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required