How to handle camera images with headless mode at SKRL?

Thanks, @toni.sm

I can solve 'viewport_legacy' problem but, the created rgba array is empty.

def capture_and_save_images(self):

camera_indices = range(self._num_envs)

save_dir = os.path.join(os.path.expanduser( '~' ), 'isaac_sim_RL_imgs')
os.makedirs(save_dir, exist_ok=True)
    
for idx in camera_indices:
    cam_rgba = self._rgb_cameras[idx].rgb_cam.get_rgba()
    cam_rgba_img = cv2.cvtColor(cam_rgba, cv2.COLOR_BGRA2RGBA)
    filename = os.path.join(save_dir, f'{self.step_num}_{idx}.png')
    cv2.imwrite(filename, cam_rgba_img)

self.step_num += 1

In above code which I uploaded, cam_rgba is empty.
Is there another way to get images?