-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEditor2.java
More file actions
27 lines (26 loc) · 884 Bytes
/
Editor2.java
File metadata and controls
27 lines (26 loc) · 884 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import java.awt.Color;
/*
Assignment number : 7
File Name : Editor2 .java
Name: Ran Zaaroor
Student ID : 290374040
Email : Ran.zaaroor@gmail.com
*/
/**
* Demonstrates the scaling function of Instush.java.
* The program recieves two command-line arguments: the name of the PPM file
* (a string) representing the image that should be scaled, and two integers
* that specify the width and the height of the scaled image. For example:
* java Editor2 ironman.ppm 100 900
*/
public class Editor2 {
public static void main (String[] args){
String filename = args[0];
int width = Integer.parseInt(args[1]);
int height = Integer.parseInt(args[2]);
Color [][] image;
image = Instush.read(filename);
image = Instush.scaled(image, width, height);
Instush.show(image);
}
}