Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(This is in the Java language. I just need help with these methods the constructor code is already written) (Need method to increase red, grayscale,

(This is in the Java language. I just need help with these methods the constructor code is already written) (Need method to increase red, grayscale, and the last method) Thank you!

Question 1.

Write a method named makeSunset3() to make a sunset. Don not decrease blue and green, but increase red. You can use beach.jpg to test this method.

Question 2. Write a method blackWhite() that create a black and white picture from a color picture. The idea is as follows: For each pixel, let avg = (r+g+b)/3. If avg < 64, set the color black. If avg >= 64, set the color white.

Question 3. Write a method changeBlue(weight). Do not change any color of the pixels in the first half of a picture. For the second half, change blue value of each pixel by new blue=original blue * weight. For example, if a pixel has values (200,100,100) and weight is 0.5, then the new values will be (200,100,50). If the weight is 1.5, then the new values will be (200,100,150).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Joe Celkos Data And Databases Concepts In Practice

Authors: Joe Celko

1st Edition

1558604324, 978-1558604322

More Books

Students also viewed these Databases questions