Join Joseph Lowery for an in-depth discussion in this video Exploring what we're going to build, part of Customizing Photo Cards with HTML5.
Let's take a tour of the completed photo card project so you can see what we'll be building. Our app is set in the Trans Planet Airlines site where folks can create their own space souvenir. The first step is to select a basic photo background to work with. I have three to select from: Astronaut, Weightlessness, and Moonwalk. Let's go with Moonwalk. Once the user has chosen a background and clicks Select Background and Proceed, they're taken to the next step where they get to upload the file in one of two ways.
They can beam it up, either by clicking on Browse and opening up a standard dialog box, or they can drop the files in here. Let's go with the second option. And for that, I'll have to bring up Finder, open up a New File window. I'll go into my Exercise Files in Chapter 1, drill on down into the images folder, and then drag George right into the drop zone. And now you can see that I have beamed up george.png. If you scroll down a little bit further, you see some information about it, its type, and file size.
And now we're ready to move on to the next step, Modify. Once we do that, the two images are combined. And the user gets a chance to integrate them by resizing, reshaping, and repositioning the uploaded photo. So, I'm going to click on the George here, find the hidden handle, bring it really big, and then just drop it right in his hands here. When they're done, they can save the layered graphic as one image. Click Save, and it tells you just to right-click on the image, and choose Save.
I'll right-click on it, and save image. It says I can save it as canvas.png. That's fine. Save it, and there's my file. So, let me double-click. And there it is in Preview, where it's ready to be emailed, printed, or posted online. So, that's a brief overview of the project. And now, you're ready to peek under the hood, so you can get a better understanding of the various technologies that are driving this app.
- Creating a form
- Uploading images
- Preparing the stage
- Manipulating photos interactively
- Saving photo cards