Question: Assignment 2 A: Image Color Depth: In Assignment 1 , we learned that each pixel of a computer image is represented with three values, RGB

Assignment 2A:
Image Color Depth: In Assignment 1, we learned that each pixel of a computer image is represented with three values, RGB. If we add transparency, we would have RGBA ("A" for alpha channel). Traditionally one byte is used for each color, meaning that each pixel takes up 4 bytes of space. These are known as 8 bits per color channel encoding, or 8 BPC for short. More recently, encodings with larger ranges of color have become popular with artists and photographers. Programs like Photoshop now support 16 BPC and 32 BPC encoding.
For this assignment, you will try to determine the encoding of an RGBA image based on its width, height, and file size. After the user enters this information, you will first check if the information is valid. If not, you will notify the user and skip to the end of the program.
(Hint: You will have to check multiple potential issues, with your IF statements)
If the detail is valid, you will then calculate the BPC encoding. Based on the value, you will use a Switch statement to print out if the image is 8,16, or 32 BPC. If it is outside the range, inform the user that your computer does not know how to read this encoding.
You must save the code in a file called "
Assignment2A.py".
Sample Output #1:
[Image Encoding Checker]
What is the image width? 10
What is the image height? -20
What is the file size (in bytes)?-200
The information is invalid - please re-enter it. Please do in python
 Assignment 2A: Image Color Depth: In Assignment 1, we learned that

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!