From 0d0e7140c4fe4653821ff05220dcb8a97f4473cc Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Thu, 29 Oct 2020 14:30:41 +0700 Subject: [PATCH] Add Comments to DesaturateIt.java --- Week9/Assignment9/bin/DesaturateIt.class | Bin 1398 -> 1398 bytes Week9/Assignment9/src/DesaturateIt.java | 17 +++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Week9/Assignment9/bin/DesaturateIt.class b/Week9/Assignment9/bin/DesaturateIt.class index b0da77f789b5a1c59ed07af594555798432e2c7f..b71923ac41de2cd5e37adaeb11c28c43d38eeb94 100644 GIT binary patch delta 29 kcmeyy^^I!-2dkhOgFAydLl}bwLn?zZLnVXOWJ%Uo0BWBG8UO$Q delta 29 kcmeyy^^I!-2dkhegFAy7Ll}cPLn?zZLnVXeWJ%Uo0BUCj761SM diff --git a/Week9/Assignment9/src/DesaturateIt.java b/Week9/Assignment9/src/DesaturateIt.java index a0b772d..79e1555 100644 --- a/Week9/Assignment9/src/DesaturateIt.java +++ b/Week9/Assignment9/src/DesaturateIt.java @@ -12,19 +12,19 @@ public class DesaturateIt{ // - original, grayscale, sepia //Array Structure // [X][Y][COLOR] - int[][][][] images = new int[3][][][]; - images[0]=rgb; - images[1]=gray; - images[2]=sepia; - Java101ImageUtil.showViewer(images,"show all"); + int[][][][] images = new int[3][][][]; //We want to draw 3 images, + images[0]=rgb; //the default image + images[1]=gray; //gray image + images[2]=sepia; //sepiaed image + Java101ImageUtil.showViewer(images,"show all"); //Call ImageUtil to draw the image } public static int [][][] grayscale(int [][][] rgb) { // fill code int[][][] grayscale = new int [rgb.length][rgb[0].length][3]; - for(int i=0;i