Case Study: A Photo Cropping and Resizing Tool
Now that you have several new methods in your ADS library, let’s create the beginnings of a nice WYSIWYG tool that will allow you to crop and resize photos. Before you get too excited, I should mention that it’s not actually possible to crop and resize a photo with your DOM script. The complete tool will require you to write a server-side portion capable of resizing the actual image file. Here, you’ll simulate the cropping and resizing actions in the browser so that once it looks the way you want, you can submit the new information to the server and do the actual modifications. This chapter will set up the tool with the basic functionality you’ll need and will resemble Figure 6-1.
Unable to display preview. Download preview PDF.