public static void main(String[] args) {

        assert (args.length >= 3):
                "Must pass at least 3 arguments!";

        String method = args[0]; // method is always the first argument
        String input  = args[args.length-2]; // input is always 2nd last argument
        String output = args[args.length-1]; // output is always last argument

        Picture image = Utils.loadPicture(input);
        Process proc  = new Process(image);

        switch (method) {

            case "invert":
                proc.invert();
                break;

            case "grayscale":
                proc.grayscale();
                break;

            case "rotate":
                int theta = Integer.parseInt(args[1]);
                proc.rotate(theta);
                break;

            case "flip":
                proc.flip(args[1]);
                break;

            case "blur":
                proc.blur();
                break;

            case "blend":
                Picture otherImage = Utils.loadPicture(args[1]);
                proc.blend(otherImage);
                break;

            case "electricField":
                proc.electricField(Integer.parseInt(args[1]),
                                   Integer.parseInt(args[2]),
                                   Integer.parseInt(args[3]));
        }

        Utils.savePicture(proc.getPicture(), output);
    }