LibreOffice Module sdext (master) 1
Static Public Member Functions | Static Private Member Functions | Static Private Attributes | List of all members
pdfi::PngHelper Class Reference

#include <pnghelper.hxx>

Static Public Member Functions

static void updateCRC (sal_uInt32 &io_rCRC, const sal_uInt8 *i_pBuf, size_t i_nLen)
 
static sal_uInt32 getCRC (const sal_uInt8 *i_pBuf, size_t i_nLen)
 
static sal_uInt32 deflateBuffer (const Output_t *i_pBuf, size_t i_nLen, OutputBuffer &o_rOut)
 
static void createPng (OutputBuffer &o_rOutputBuf, Stream *str, int width, int height, GfxRGB const &zeroColor, GfxRGB const &oneColor, bool bIsMask)
 
static void createPng (OutputBuffer &o_rOutputBuf, Stream *str, int width, int height, GfxImageColorMap *colorMap, Stream *maskStr, int maskWidth, int maskHeight, GfxImageColorMap *maskColorMap)
 
static void createPng (OutputBuffer &o_rOutputBuf, Stream *str, int width, int height, GfxImageColorMap *colorMap, Stream *maskStr, int maskWidth, int maskHeight, bool maskInvert)
 

Static Private Member Functions

static void initCRCTable ()
 
static void appendFileHeader (OutputBuffer &o_rOutputBuf)
 
static size_t startChunk (const char *pChunkName, OutputBuffer &o_rOut)
 
static void endChunk (size_t nStart, OutputBuffer &o_rOut)
 
static void set (sal_uInt32 i_nValue, OutputBuffer &o_rOutputBuf, size_t i_nIndex)
 
static void append (sal_uInt32 i_nValue, OutputBuffer &o_rOutputBuf)
 
static void appendIHDR (OutputBuffer &o_rOutputBuf, int width, int height, int depth, int colortype)
 
static void appendIEND (OutputBuffer &o_rOutputBuf)
 

Static Private Attributes

static sal_uInt32 crc_table [256]
 
static bool bCRCTableInit = true
 

Detailed Description

Definition at line 29 of file pnghelper.hxx.

Member Function Documentation

◆ append()

static void pdfi::PngHelper::append ( sal_uInt32  i_nValue,
OutputBuffer o_rOutputBuf 
)
inlinestaticprivate

Definition at line 40 of file pnghelper.hxx.

References set().

Referenced by appendIHDR(), and endChunk().

◆ appendFileHeader()

void PngHelper::appendFileHeader ( OutputBuffer o_rOutputBuf)
staticprivate

Definition at line 118 of file pnghelper.cxx.

References SAL_N_ELEMENTS.

Referenced by createPng().

◆ appendIEND()

void PngHelper::appendIEND ( OutputBuffer o_rOutputBuf)
staticprivate

Definition at line 172 of file pnghelper.cxx.

References endChunk(), and startChunk().

Referenced by createPng().

◆ appendIHDR()

void PngHelper::appendIHDR ( OutputBuffer o_rOutputBuf,
int  width,
int  height,
int  depth,
int  colortype 
)
staticprivate

Definition at line 159 of file pnghelper.cxx.

References append(), endChunk(), and startChunk().

Referenced by createPng().

◆ createPng() [1/3]

void PngHelper::createPng ( OutputBuffer o_rOutputBuf,
Stream *  str,
int  width,
int  height,
GfxImageColorMap *  colorMap,
Stream *  maskStr,
int  maskWidth,
int  maskHeight,
bool  maskInvert 
)
static

◆ createPng() [2/3]

void PngHelper::createPng ( OutputBuffer o_rOutputBuf,
Stream *  str,
int  width,
int  height,
GfxImageColorMap *  colorMap,
Stream *  maskStr,
int  maskWidth,
int  maskHeight,
GfxImageColorMap *  maskColorMap 
)
static

◆ createPng() [3/3]

void PngHelper::createPng ( OutputBuffer o_rOutputBuf,
Stream *  str,
int  width,
int  height,
GfxRGB const &  zeroColor,
GfxRGB const &  oneColor,
bool  bIsMask 
)
static

Definition at line 178 of file pnghelper.cxx.

References appendFileHeader(), appendIEND(), appendIHDR(), deflateBuffer(), endChunk(), startChunk(), x, and y.

Referenced by pdfi::writePng_().

◆ deflateBuffer()

sal_uInt32 PngHelper::deflateBuffer ( const Output_t i_pBuf,
size_t  i_nLen,
OutputBuffer o_rOut 
)
static

Definition at line 76 of file pnghelper.cxx.

Referenced by createPng().

◆ endChunk()

void PngHelper::endChunk ( size_t  nStart,
OutputBuffer o_rOut 
)
staticprivate

Definition at line 144 of file pnghelper.cxx.

References append(), getCRC(), and set().

Referenced by appendIEND(), appendIHDR(), and createPng().

◆ getCRC()

sal_uInt32 PngHelper::getCRC ( const sal_uInt8 i_pBuf,
size_t  i_nLen 
)
static

Definition at line 69 of file pnghelper.cxx.

References updateCRC().

Referenced by endChunk().

◆ initCRCTable()

void PngHelper::initCRCTable ( )
staticprivate

Definition at line 36 of file pnghelper.cxx.

References bCRCTableInit, crc_table, and n.

Referenced by updateCRC().

◆ set()

void PngHelper::set ( sal_uInt32  i_nValue,
OutputBuffer o_rOutputBuf,
size_t  i_nIndex 
)
staticprivate

Definition at line 136 of file pnghelper.cxx.

Referenced by append(), and endChunk().

◆ startChunk()

size_t PngHelper::startChunk ( const char *  pChunkName,
OutputBuffer o_rOut 
)
staticprivate

Definition at line 125 of file pnghelper.cxx.

References nIndex.

Referenced by appendIEND(), appendIHDR(), and createPng().

◆ updateCRC()

void PngHelper::updateCRC ( sal_uInt32 &  io_rCRC,
const sal_uInt8 i_pBuf,
size_t  i_nLen 
)
static

Definition at line 58 of file pnghelper.cxx.

References bCRCTableInit, crc_table, initCRCTable(), and n.

Referenced by getCRC().

Member Data Documentation

◆ bCRCTableInit

bool PngHelper::bCRCTableInit = true
staticprivate

Definition at line 32 of file pnghelper.hxx.

Referenced by initCRCTable(), and updateCRC().

◆ crc_table

sal_uInt32 PngHelper::crc_table
staticprivate

Definition at line 31 of file pnghelper.hxx.

Referenced by initCRCTable(), and updateCRC().


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