|
gtsam_points
|
Screen capture utility to asynchronously fetch rendering results and save them as images. More...
#include <screen_capture.hpp>
Public Types | |
| using | Pixels = std::vector< unsigned char > |
| using | PixelsPtr = std::shared_ptr< Pixels > |
| using | ImageSaveData = std::pair< std::string, PixelsPtr > |
Public Member Functions | |
| ScreenCapture (const Eigen::Vector2i &image_size, int num_encode_threads, int num_pixel_buffers=2, std::shared_ptr< guik::ConcurrentQueue< ImageSaveData > > queue=std::make_shared< guik::StdConcurrentQueue< ImageSaveData > >()) | |
| Constructor. | |
| ~ScreenCapture () | |
| size_t | queue_size () const |
| Image encoding queue size. | |
| void | capture (const std::string &dst_filename) |
| Capture the viewer main canvas and save it as a image file. | |
| void | capture (const std::string &dst_filename, const glk::Texture &texture) |
| Capture texture contents and save it as a image file. | |
Screen capture utility to asynchronously fetch rendering results and save them as images.
| using guik::ScreenCapture::ImageSaveData = std::pair<std::string, PixelsPtr> |
| using guik::ScreenCapture::Pixels = std::vector<unsigned char> |
| using guik::ScreenCapture::PixelsPtr = std::shared_ptr<Pixels> |
| guik::ScreenCapture::ScreenCapture | ( | const Eigen::Vector2i & | image_size, |
| int | num_encode_threads, | ||
| int | num_pixel_buffers = 2, |
||
| std::shared_ptr< guik::ConcurrentQueue< ImageSaveData > > | queue = std::make_shared< guik::StdConcurrentQueue< ImageSaveData > >() |
||
| ) |
Constructor.
| image_size | Image size |
| num_encode_threads | Number of threds for image encoding |
| num_pixel_buffers | Number of pixel buffers |
| queue | Concurrent data queue (Use TbbConcurrentQueue for better multi-threading performance) |
| guik::ScreenCapture::~ScreenCapture | ( | ) |
| void guik::ScreenCapture::capture | ( | const std::string & | dst_filename | ) |
Capture the viewer main canvas and save it as a image file.
| dst_filename | Filename (must end with ".png" or ".jpg") |
| void guik::ScreenCapture::capture | ( | const std::string & | dst_filename, |
| const glk::Texture & | texture | ||
| ) |
Capture texture contents and save it as a image file.
| dst_filename | Filename (must end with ".png" or ".jpg") |
| size_t guik::ScreenCapture::queue_size | ( | ) | const |
Image encoding queue size.