Question: ' ' ' Searching for Images with PIL Professor Hoffman April 2 0 2 4 ' ' ' import sys import os from PIL import
Searching for Images with PIL
Professor Hoffman
April
import sys
import os
from PIL import Image
print
Week Starter Script
while True:
path input
FileName to Examine Q to Quit:
if path.lowerq:
break
if ospath.isfilepath:
ext ospath.splitextpath
try:
with Image.openpath as im:
printFile Details"
printExtension: ext
printImage Format: imformat
printImage Width: imwidth, "Pixels"
printImageHeight: imheight, "Pixels"
printImageMode: immode
except Exception as err:
printFile is not a known Image Type: path
else:
printPath Provide is Not a File"
printScript Done"
This week you will be generating a photo search script leveraging this weeks briefing, demonstration and sample scripts.
You will extract the photos.zip file provided. You will then process each file provided in the photos.zip extracted folder.
You will examine each file and determine if it is an image using the PIL library method, and extract and report the path, extension, format, width, height and mode of each image. These will be displayed in a PrettyTable. SampleOutput is provided
Your script will produce the following outputs:
You will submit files.
Submit:
Your final script
Screenshot of your PrettyTable
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
