Question: Using the Picture class from Worked Example 6.2, write a method: that superimposes two pictures, yielding a picture whose width and height are the larger

Using the Picture class from Worked Example 6.2, write a method:

public static Picture superimpose (Picture picl, Picture pic2)

that superimposes two pictures, yielding a picture whose width and height are the larger of the widths and heights of pic1 and pic2. In the area where both pictures have pixels, average the colors.

Data from worked example 6.2

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

••

public static Picture superimpose (Picture picl, Picture pic2)

Step by Step Solution

3.41 Rating (167 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Based on the provided information you want to write a method that superimposes two pictures and averages the colors in the overlapping areas Here is h... View full answer

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 Java Programming Questions!