The best way to collect pixels from viewport/camera in an extension

A remark in connection with this post… Simple render USD scene to PNG - #11 by didjich