Split screenshot taking logic.