Correlation 4.10.0
An Analysis Tool for Liquids and for Amorphous Solids
Loading...
Searching...
No Matches
correlation::app::TrajectoryExportManager Class Reference

Encodes rendered RGBA8 trajectory frames into PNG-sequence ZIP archives or Animated GIFs. More...

#include <TrajectoryExportManager.hpp>

Static Public Member Functions

static bool exportPngSequenceZip (const std::string &filepath, const std::vector< std::vector< std::uint8_t > > &frames, std::uint32_t width, std::uint32_t height)
 Writes a sequence of RGBA8 frames as numbered PNGs inside a single ZIP archive.
static bool exportAnimatedGif (const std::string &filepath, const std::vector< std::vector< std::uint8_t > > &frames, std::uint32_t width, std::uint32_t height, std::uint16_t delay_cs=6)
 Encodes RGBA8 frames into a self-contained looping GIF89a animation.

Detailed Description

Encodes rendered RGBA8 trajectory frames into PNG-sequence ZIP archives or Animated GIFs.

Member Function Documentation

◆ exportAnimatedGif()

bool correlation::app::TrajectoryExportManager::exportAnimatedGif ( const std::string & filepath,
const std::vector< std::vector< std::uint8_t > > & frames,
std::uint32_t width,
std::uint32_t height,
std::uint16_t delay_cs = 6 )
staticnodiscard

Encodes RGBA8 frames into a self-contained looping GIF89a animation.

Parameters
[in]filepathDestination .gif path.
[in]framesContiguous RGBA8 frame buffers (each size == width * height * 4).
[in]widthFrame pixel width.
[in]heightFrame pixel height.
[in]delay_csFrame delay in centiseconds (e.g. 6 = ~16 FPS).
Returns
True if GIF file was written successfully.
Here is the caller graph for this function:

◆ exportPngSequenceZip()

bool correlation::app::TrajectoryExportManager::exportPngSequenceZip ( const std::string & filepath,
const std::vector< std::vector< std::uint8_t > > & frames,
std::uint32_t width,
std::uint32_t height )
staticnodiscard

Writes a sequence of RGBA8 frames as numbered PNGs inside a single ZIP archive.

Parameters
[in]filepathDestination .zip path.
[in]framesContiguous RGBA8 frame buffers (each size == width * height * 4).
[in]widthFrame pixel width.
[in]heightFrame pixel height.
Returns
True if archive was written successfully.
Here is the caller graph for this function:

The documentation for this class was generated from the following files: