Color Inversion in Visualizer.capture_screen_float_buffer()
- Dominant language
- C++
- Stars
- 14k
- Forks
- 2.6k
- Avg merge
- 5d 18h
- Merged PRs (30d)
- 6
Description
### Checklist
- [X] I have searched for [similar issues](https://github.com/isl-org/Open3D/issues).
- [X] For Python issues, I have tested with the [latest development wheel](http://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](http://www.open3d.org/docs/release/) and the [latest documentation](http://www.open3d.org/docs/latest/) (for `master` branch).
### Describe the issue
I have been trying to take a screenshot from the Open3d Visualizer and then continue with opencv-python.
I noticed that the colors are inverted when I use `capture_screen_float_buffer()`.
`capture_screen_image()` shows the correct colors.
Result of `capture_screen_float_buffer()`:

Result of `capture_screen_image()`:

### Steps to reproduce the bug
```python
import open3d as o3d
import numpy as np
import cv2
eagle = o3d.data.EaglePointCloud()
pcd = o3d.io.read_point_cloud(eagle.path)
pcd.paint_uniform_color([1, 0, 0]) # Red
vis = o3d.visualization.Visualizer()
vis.create_window(width=1920, height=1200, visible=False)
vis.add_geometry(pcd)
vis.capture_screen_image('Screenshot_Open3D.png', do_render=True)
image_o3d = vis.capture_screen_float_buffer(do_render=True)
image_cv2 = (255.0 * np.asarray(image_o3d)).astype(np.uint8)
cv2.imwrite('Screenshot_cv2.png', image_cv2)
```
### Error message
_No response_
### Expected behavior
I expect the same color for both image exports using `capture_screen_float_buffer()` and `capture_screen_image()`, respectively.
### Open3D, Python and System information
```markdown
- Operating system: Ubuntu 20.04
- Python version: 3.8.10 (default, Mar 15 2022, 12:22:08) \n[GCC 9.4.0]
- Open3D version: output from python: 0.15.2+429c3fa
- System architecture: x86
- Is this a remote workstation?: no
- How did you install Open3D?: pip
```
### Additional information
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.