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

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.

Step by Step Solution

3.39 Rating (165 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

def create Thumbnail Site directory indexFile opendi... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Introduction to Computing and Programming in Pytho Questions!