Given a folder with images in it, create an index HTML page with links to each image.

Question:

Given a folder with images in it, create an index HTML page with links to each image. Write a function that takes a string which is the path to a directory. You will create a page in the folder named index.html that should be an HTML page containing a link to every JPEG file in the directory.

You will also generate a thumbnail (half the size) copy of each image. Use makeEmptyPicture to create a blank picture of the right size, then scale down the original picture into the blank picture. Name the new image “half-” + the original filename (e.g., if the original filename was fred.jpg, save the half-size image as half-fred.jpg). The anchor in the link to each full-size picture should be the half-size image.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: