Question: Method name : mergeImages Parameter(s) : Two Picture objects of the same width and height. The first is a source image, the second is a
Method name: mergeImages Parameter(s): Two Picture objects of the same width and height. The first is a source image, the second is a green screen image (e.g. cat.png) Return value: A new Picture object with the pictures merged, using the following logic. Each pixel in the returned image should come from the green screen image, unless the green screen pixel is exactly equal (use .equals, not ==, for comparing Color objects) to new Color(0, 255, 0). If the green screen image pixel is green, the pixel in the returned image should instead come from the source image. This will effectively replace the all-green background in the green screen image with the source image, similar to how green screens work. Language is in Java
Step by Step Solution
There are 3 Steps involved in it
To solve this problem you need to create a method in Java called mergeImages that merges two images based on a specific condition replacing green pixe... View full answer
Get step-by-step solutions from verified subject matter experts
