Question
This is code that I'm using for a project, and I can't seem to figure out what is wrong with my code. When I try
This is code that I'm using for a project, and I can't seem to figure out what is wrong with my code. When I try to run this code I get multiple errors. If possible can this code be debugged, and can you also describe the mistakes I've made and how you fixed them? Thank you very much!
This is also the code that I'm using for my second project. I have received feedback from my professor and I don't really know what he is trying to say my mistake is. He says "Increasing the brightness with a factor of 1.5, means some different pixels are saturated to 255 and look the same, which means what you do, basically can be the opposite of image enhancement!" If you can fix my code and tell me where I went wrong that would be amazing. I am a first-year student and I'm just now learning to code so thank you for all of your help!
from PIL import Image, ImageEnhance \# Load the image image = Image.open ("kids.tif") \# Convert to grayscale gray_image = image.convert("L") \# Save the grayscale image before changes in brightness gray_image.save("kids_grayscale before.tif") \# Enhance brightness enhancer = ImageEnhance.Brightness(gray_image) bright image = enhancer.enhance (1.5) \# Save the grayscale image after changes in brightness bright_image. Save("kids ograysale after.tif") \# Save the original colored image image. save ("kids original.tif")Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started