Lab 5—Your First JavaScripts

Part 2—Preparing images for this lab


  1. Find your four (4) images. It's easiest if you take pictures of yourself. You can use pictures of anything as long as all four pictures are of the same subject or object. They should be slightly different, as you can see in this example:

    four photos in a strip

  2. Save the four images as pic1.jpg, pic2.jpg, pic3.jpg, and pic4.jpg in your lab05 folder.

  3. If you took the four photos with PhotoBooth on the Mac or with your cell phone camera, you can skip this step and go to Step 4..
    1. Find your lab05 folder in Windows Explorer.
    2. Hold the mouse over the first photo. Note the dimensions and the size.
      Windows Explorer shows image sizes

    3. Repeat for each of the other photos.
    4. If all four images are the same dimensions and size, go to step 4.
    5. Otherwise, open the four photos in Photoshop or GIMP (Choose Open from the File menu). In PhotoShop go to Images > Image Size > and change to 72dpi and the narrowest width in your four photos. Save the image as pic1.jpg in your lab05 folder.
    6. Repeat for the other three photos, making them all 72dpi and the same width and saving them as pic2.jpg, pic3.jpg, and pic4.jpg in your lab05 folder.
      .
  4. You now have four photos that are the same size and they have been saved to your lab05 folder.


The next page will explain how to write a JavaScript to make your images rotate....

 

previous page   next page