private static ByteBuffer makeRGBABuffer(ArrayBitmap image) {
		if (image == null) {
			return null;
		}
		final ByteBuffer buffer = BufferUtils.createByteBuffer(image.getWidth()
				* image.getHeight() * 4);
		image.visitAll(new ArrayBitmap.IVisitor() {
			@Override
			public void visit(int x, int y, int pixel) {
				buffer.put(Color.getARGBComponent(pixel, 1));
				buffer.put(Color.getARGBComponent(pixel, 2));
				buffer.put(Color.getARGBComponent(pixel, 3));
				buffer.put(Color.getARGBComponent(pixel, 0));
			}
		});
		buffer.flip();
		return buffer;
	}