(Solved) : Write Code Following Given Method Transforms Image Original Image Args 0 1536 Rows X 1819 Q42731589 . . .

Write the code for the following given method that transforms animage. The original image (args[0]) has 1536 rows x 1819 columns.The collage resulting from the constructor on the left has 400 rowsby 400 columns.

ArtCollage art = new ArtCollage(args[0]);art.showCollagePicture();


Here are the given codes:

import java.awt.Color;

public class ArtCollage {

// The orginal picture
private Picture original;

// The collage picture
private Picture collage;

// The collage Picture consists of collageDimension XcollageDimension tiles
private int collageDimension;

// A tile consists of tileDimension X tileDimension pixels
private int tileDimension;

   * One-argument Constructor
   * 1. set default values of collageDimension to 4 andtileDimension to 100
   * 2. initializes original with the filenameimage
   * 3. initializes collage as a Picture oftileDimension*collageDimension xtileDimension*collageDimension,
   * where each pixel is black (see all constructors forthe Picture class).
   * 4. update collage to be a scaled version of original(see scaling filter on Week 9 slides)
   * @param filename the image filename
public ArtCollage (String filename) {


Expert Answer

Answer to Write the code for the following given method that transforms an image. The original image (args[0]) has 1536 rows x 181…

Leave a Comment


We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us

× How can I help you?