TDME2 1.9.121
Classes | Static Public Member Functions | Static Private Member Functions | Friends | List of all members
PNGTextureWriter Class Referencefinal

PNG texture writer class. More...

#include <tdme/engine/fileio/textures/PNGTextureWriter.h>

Collaboration diagram for PNGTextureWriter:
Collaboration graph

Classes

class  PNGOutputStream
 PNG output stream. More...
 

Static Public Member Functions

static bool write (Texture *texture, const string &pathName, const string &fileName, bool removeAlphaChannel=true, bool flipY=true)
 Writes a texture to PNG file. More...
 
static bool write (Texture *texture, vector< uint8_t > &pngData, bool removeAlphaChannel=true, bool flipY=true)
 Writes a texture to PNG using a data vector. More...
 

Static Private Member Functions

static void writePNGDataToMemory (png_structp png_ptr, png_bytep inBytes, png_size_t inBytesToWrite)
 Write PNG data to memory. More...
 
static void flushPNGDataToMemory (png_structp png_ptr)
 Flush PNG data. More...
 

Friends

class Texture
 

Detailed Description

PNG texture writer class.

Author
Andreas Drewke
Version
$Id$

Definition at line 21 of file PNGTextureWriter.h.

Member Function Documentation

◆ flushPNGDataToMemory()

void flushPNGDataToMemory ( png_structp  png_ptr)
staticprivate

Flush PNG data.

Parameters
png_ptrpng structure

Definition at line 39 of file PNGTextureWriter.cpp.

◆ write() [1/2]

bool write ( Texture texture,
const string &  pathName,
const string &  fileName,
bool  removeAlphaChannel = true,
bool  flipY = true 
)
static

Writes a texture to PNG file.

Parameters
texturetexture
pathNamepath name
fileNamefile name
removeAlphaChannelremove alpha channel
flipYflip Y
Returns
texture data instance or null

Definition at line 43 of file PNGTextureWriter.cpp.

◆ write() [2/2]

bool write ( Texture texture,
vector< uint8_t > &  pngData,
bool  removeAlphaChannel = true,
bool  flipY = true 
)
static

Writes a texture to PNG using a data vector.

Parameters
texturetexture
pngDataPNG data
removeAlphaChannelremove alpha channel
flipYflip Y
Returns
texture data instance or null

Definition at line 52 of file PNGTextureWriter.cpp.

◆ writePNGDataToMemory()

void writePNGDataToMemory ( png_structp  png_ptr,
png_bytep  inBytes,
png_size_t  inBytesToWrite 
)
staticprivate

Write PNG data to memory.

Parameters
png_ptrpng structure
inBytesin bytes
inBytesToWritein bytes to write

Definition at line 31 of file PNGTextureWriter.cpp.

Friends And Related Function Documentation

◆ Texture

friend class Texture
friend

Definition at line 23 of file PNGTextureWriter.h.


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