Question
Need some help with this Old fashion photographs from the nineteenth century are not quite black and white and not quite color, but seem to
Need some help with this
Old fashion photographs from the nineteenth century are not quite black and white and not quite color, but seem to have shades of gray, brown, and blue. This effect is known as sepia. Write and test a function named sepia that converts color image to sepia. This function should first call grayscale to convert the color image to grayscale. A code segment for transforming the grayscale values to achieve effect follows. Note that the value for green does not change.
If red < 63:
red = int(red * 1.1)
blue = int(blue * 0.9)
elif red < 192:
red = int(red * 1.15)
blue = (blue * 0.85)
else:
red = min(int(red * 1.08), 255)
blue = int (blue * 0.93)
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