void blendingBenchmark(String[] args) {
		int iterations = args.length > 1 ? Integer.valueOf(args[1]) : 100;
		int testW = args.length > 2 ? Integer.valueOf(args[2]) : 512;
		int testH = testW;
		CPLayer l1 = new CPLayer(testW, testH), l2 = new CPLayer(testW, testH);

		System.out
				.println("Benchmarking layer blending " + testW + "x" + testH + ", iterations=" + iterations + "\n\n");

		boolean fa = false;

		System.out.println("Testing if layer is full-alpha mode");
		System.out.println("===================================");

		prepareLayers(l1, l2, 0);
		double lastTime = System.currentTimeMillis(), newTime;
		for (int i = 0; i < iterations; i++) {
			l2.hasAlpha();
		}
		newTime = System.currentTimeMillis();
		System.out.println("Result time: " + String.valueOf((newTime - lastTime) / 1000.) + "s "
				+ String.valueOf((newTime - lastTime) * 1000. / (iterations)) + "us per iteration "
				+ String.valueOf((newTime - lastTime) * 1000000. / ((double) iterations * testW * testH))
				+ "ns per pixel\n");

		for (int i = 0; i < 2; i++, fa = !fa) {
			System.out.println("Full Alpha: " + (fa ? "on" : "off"));

			System.out.println("Normal blending mode");
			System.out.println("====================");

			l1.setBlendMode(CPLayer.LM_NORMAL);
			prepareLayers(l1, l2, 0);
			blendingBench(l1, l2, iterations, fa);

			System.out.println("Multiply blending mode");
			System.out.println("====================");

			l1.setBlendMode(CPLayer.LM_MULTIPLY);
			prepareLayers(l1, l2, 0);
			blendingBench(l1, l2, iterations, fa);

			System.out.println("Add blending mode");
			System.out.println("====================");

			l1.setBlendMode(CPLayer.LM_ADD);
			prepareLayers(l1, l2, 0);
			blendingBench(l1, l2, iterations, fa);

			System.out.println("Screen blending mode");
			System.out.println("====================");

			l1.setBlendMode(CPLayer.LM_SCREEN);
			prepareLayers(l1, l2, 0);
			blendingBench(l1, l2, iterations, fa);

			System.out.println("Lighten blending mode");
			System.out.println("====================");

			l1.setBlendMode(CPLayer.LM_LIGHTEN);
			prepareLayers(l1, l2, 0);
			blendingBench(l1, l2, iterations, fa);

			System.out.println("Darken blending mode");
			System.out.println("====================");

			l1.setBlendMode(CPLayer.LM_DARKEN);
			prepareLayers(l1, l2, 0);
			blendingBench(l1, l2, iterations, fa);

			System.out.println("Subtract blending mode");
			System.out.println("====================");

			l1.setBlendMode(CPLayer.LM_SUBTRACT);
			prepareLayers(l1, l2, 0);
			blendingBench(l1, l2, iterations, fa);

			System.out.println("Dodge blending mode");
			System.out.println("====================");

			l1.setBlendMode(CPLayer.LM_DODGE);
			prepareLayers(l1, l2, 0);
			blendingBench(l1, l2, iterations, fa);

			System.out.println("Burn blending mode");
			System.out.println("====================");

			l1.setBlendMode(CPLayer.LM_BURN);
			prepareLayers(l1, l2, 0);
			blendingBench(l1, l2, iterations, fa);

			System.out.println("Overlay blending mode");
			System.out.println("====================");

			l1.setBlendMode(CPLayer.LM_OVERLAY);
			prepareLayers(l1, l2, 0);
			blendingBench(l1, l2, iterations, fa);

			System.out.println("Hard light blending mode");
			System.out.println("====================");

			l1.setBlendMode(CPLayer.LM_HARDLIGHT);
			prepareLayers(l1, l2, 0);
			blendingBench(l1, l2, iterations, fa);

			System.out.println("Soft light blending mode");
			System.out.println("====================");

			l1.setBlendMode(CPLayer.LM_SOFTLIGHT);
			prepareLayers(l1, l2, 0);
			blendingBench(l1, l2, iterations, fa);

			System.out.println("Vivid light blending mode");
			System.out.println("====================");

			l1.setBlendMode(CPLayer.LM_VIVIDLIGHT);
			prepareLayers(l1, l2, 0);
			blendingBench(l1, l2, iterations, fa);

			System.out.println("Pin light blending mode");
			System.out.println("====================");

			l1.setBlendMode(CPLayer.LM_PINLIGHT);
			prepareLayers(l1, l2, 0);
			blendingBench(l1, l2, iterations, fa);
		}
	}