public byte[] renderImage(final ACamera camera) {

		// measure render time
		LOG.info("rendering image...");
		this.information = new RenderInformation();
		this.information.start();

		// calculate the size of the image data
		this.data = new byte[this.settings.getBytes()];

		// initialize the render pool
		int threadCount = Runtime.getRuntime().availableProcessors();
		ExecutorService pool = Executors.newFixedThreadPool(threadCount);
		Chunk base = new Chunk(32, 32);

		// v
		for (int v = 0; v < this.settings.getHeight() / base.height; v++) {
			// u
			for (int u = 0; u < this.settings.getWidth() / base.width; u++) {

				Chunk chunk = new Chunk(u * base.width, v * base.height, base.width, base.height);
				pool.execute(new RenderChunk(chunk, camera, this.scene, this.listener, this.settings,
						this.information, this.data));

			}

			// u rest
			int ur = this.settings.getWidth() - (int) (this.settings.getWidth() / base.width) * base.width;
			if (ur > 0) {

				Chunk chunk = new Chunk((this.settings.getWidth() / base.width) * base.width, v * base.height, ur,
						base.height);
				pool.execute(new RenderChunk(chunk, camera, this.scene, this.listener, this.settings,
						this.information, this.data));

			}
		}

		// v rest
		int vr = this.settings.getHeight() - (int) (this.settings.getHeight() / base.height) * base.height;
		if (vr > 0) {

			// TODO: Qbit - this is a hack, handle last line properly
			Chunk chunk = new Chunk(0, (this.settings.getHeight() / base.height) * base.height,
					this.settings.getWidth(), vr);
			pool.execute(new RenderChunk(chunk, camera, this.scene, this.listener, this.settings, this.information,
					this.data));

		}

		// wait for all threads to finish
		try {
			pool.shutdown();
			pool.awaitTermination(20, TimeUnit.MINUTES);
		} catch (InterruptedException e) {
			LOG.log(Level.SEVERE, "an error occured while executing render threads", e);
		}

		// log render results
		this.information.stop();
		LOG.info("rendering done");
		LOG.info(this.information.printInfos(this.settings));
		
		return this.data;
	}