public static void main(String[] args) {
		//Check whether usage needs to be printed or not.
		if (args.length != 3 && args.length != 4) {
			printInfo();
			return;
		}

		//Set arguments (files, direction, GZIP)
		String inarg = args[0];
		String dirarg = args[1];
		String outarg = args[2];
		boolean topng = dirarg.equalsIgnoreCase("topng");
		if (args.length == 4) {
			if (!topng) {
				printInfo();
				return;
			}
			useGZIP = args[3].toLowerCase().equals("y")?Use.TRUE:
					args[3].toLowerCase().equals("n")?Use.FALSE:
							Use.AUTO;
		}

		//JAVAMON! GOTTA CATCH 'EM ALL!
		try {
			File input = new File(inarg);
			FileInputStream fis = new FileInputStream(input);
			File output = new File(outarg);
			if (output.exists()) {
				output.delete();
			}
			output.createNewFile();
			FileOutputStream fos = new FileOutputStream(output);

			if (topng) {
				Image png = convertStreamToPNG(fis);
				PNGEncoder.encode(png, fos);
			} else {
				Image png = PNGDecoder.decode(fis);
				byte[] data = convertPNGToBlob(png);
				fos.write(data);
			}

			fis.close();
			fos.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}