Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TASPngWriter Class Reference

C++ wrapper over simple writer of PNG files for standard GL memory formats: LUMINANCE, LUMINANCE_ALPHA, RGB, and RGBA.

Definition at line 7 of file TASPngWriter.h.

Public Member Functions

 TASPngWriter ()=default
 
 TASPngWriter (int w, int h, unsigned char t=2, unsigned char d=8)
 
std::vector< unsigned char * > & ref_row_pointers ()
 
void set_luminance ()
 
void set_luminance_alpha ()
 
void set_rgb ()
 
void set_rgba ()
 
void set_type (bool is_rgb, bool has_alpha)
 
int write_png_file (std::string_view filename)
 

Private Attributes

unsigned char bit_depth = 8
 
unsigned char color_type = 0
 
int height = 0
 
std::vector< unsigned char * > row_pointers
 
int width = 0
 

#include <TASPngWriter.h>

Constructor & Destructor Documentation

◆ TASPngWriter() [1/2]

TASPngWriter::TASPngWriter ( )
default

◆ TASPngWriter() [2/2]

TASPngWriter::TASPngWriter ( int  w,
int  h,
unsigned char  t = 2,
unsigned char  d = 8 
)
inline

Definition at line 16 of file TASPngWriter.h.

Member Function Documentation

◆ ref_row_pointers()

std::vector< unsigned char * > & TASPngWriter::ref_row_pointers ( )
inline

Definition at line 32 of file TASPngWriter.h.

◆ set_luminance()

void TASPngWriter::set_luminance ( )
inline

Definition at line 27 of file TASPngWriter.h.

◆ set_luminance_alpha()

void TASPngWriter::set_luminance_alpha ( )
inline

Definition at line 28 of file TASPngWriter.h.

◆ set_rgb()

void TASPngWriter::set_rgb ( )
inline

Definition at line 29 of file TASPngWriter.h.

◆ set_rgba()

void TASPngWriter::set_rgba ( )
inline

Definition at line 30 of file TASPngWriter.h.

◆ set_type()

void TASPngWriter::set_type ( bool  is_rgb,
bool  has_alpha 
)
inline

Definition at line 21 of file TASPngWriter.h.

◆ write_png_file()

int TASPngWriter::write_png_file ( std::string_view  filename)

Definition at line 14 of file TASPngWriter.cxx.

Member Data Documentation

◆ bit_depth

unsigned char TASPngWriter::bit_depth = 8
private

Definition at line 11 of file TASPngWriter.h.

◆ color_type

unsigned char TASPngWriter::color_type = 0
private

Definition at line 10 of file TASPngWriter.h.

◆ height

int TASPngWriter::height = 0
private

Definition at line 9 of file TASPngWriter.h.

◆ row_pointers

std::vector<unsigned char *> TASPngWriter::row_pointers
private

Definition at line 12 of file TASPngWriter.h.

◆ width

int TASPngWriter::width = 0
private

Definition at line 8 of file TASPngWriter.h.

Libraries for TASPngWriter:

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