#include <llpngwrapper.h>

Public Member Functions | |
| LLPngWrapper () | |
| virtual | ~LLPngWrapper () |
| BOOL | isValidPng (U8 *src) |
| BOOL | readPng (U8 *src, LLImageRaw *rawImage, ImageInfo *infop=NULL) |
| BOOL | writePng (const LLImageRaw *rawImage, U8 *dst) |
| U32 | getFinalSize () |
| LLString | getErrorMessage () |
Protected Member Functions | |
| void | normalizeImage () |
| void | updateMetaData () |
Private Member Functions | |
| void | releaseResources () |
Static Private Member Functions | |
| static void | writeFlush (png_structp png_ptr) |
| static void | errorHandler (png_structp png_ptr, png_const_charp msg) |
| static void | readDataCallback (png_structp png_ptr, png_bytep dest, png_size_t length) |
| static void | writeDataCallback (png_structp png_ptr, png_bytep src, png_size_t length) |
Private Attributes | |
| png_structp | mReadPngPtr |
| png_infop | mReadInfoPtr |
| png_structp | mWritePngPtr |
| png_infop | mWriteInfoPtr |
| U8 ** | mRowPointers |
| png_uint_32 | mWidth |
| png_uint_32 | mHeight |
| S32 | mBitDepth |
| S32 | mColorType |
| S32 | mChannels |
| S32 | mInterlaceType |
| S32 | mCompressionType |
| S32 | mFilterMethod |
| U32 | mFinalSize |
| BOOL | mHasBKGD |
| png_color_16p | mBackgroundColor |
| F64 | mGamma |
| LLString | mErrorMessage |
Classes | |
| struct | ImageInfo |
| struct | PngDataInfo |
Definition at line 37 of file llpngwrapper.h.
| LLPngWrapper::LLPngWrapper | ( | ) |
Definition at line 43 of file llpngwrapper.cpp.
| LLPngWrapper::~LLPngWrapper | ( | ) | [virtual] |
Definition at line 59 of file llpngwrapper.cpp.
References releaseResources().

| BOOL LLPngWrapper::readPng | ( | U8 * | src, | |
| LLImageRaw * | rawImage, | |||
| ImageInfo * | infop = NULL | |||
| ) |
Definition at line 119 of file llpngwrapper.cpp.
References errorHandler(), FALSE, LLImageBase::getData(), i, mBitDepth, mChannels, mColorType, LLPngWrapper::ImageInfo::mComponents, mCompressionType, LLPngWrapper::PngDataInfo::mData, mErrorMessage, mFilterMethod, mFinalSize, LLPngWrapper::ImageInfo::mHeight, mHeight, mInterlaceType, LLPngWrapper::PngDataInfo::mOffset, mReadInfoPtr, mReadPngPtr, mRowPointers, LLPngWrapper::ImageInfo::mWidth, mWidth, normalizeImage(), NULL, readDataCallback(), releaseResources(), LLImageRaw::resize(), TRUE, and updateMetaData().
Referenced by LLImagePNG::decode(), and LLImagePNG::updateData().


| BOOL LLPngWrapper::writePng | ( | const LLImageRaw * | rawImage, | |
| U8 * | dst | |||
| ) |
Definition at line 269 of file llpngwrapper.cpp.
References errorHandler(), FALSE, LLImageBase::getComponents(), LLImageBase::getData(), LLImageBase::getHeight(), LLImageBase::getWidth(), i, mBitDepth, mChannels, mColorType, mCompressionType, LLPngWrapper::PngDataInfo::mData, mErrorMessage, mFilterMethod, mFinalSize, mHeight, mInterlaceType, LLPngWrapper::PngDataInfo::mOffset, mWidth, mWriteInfoPtr, mWritePngPtr, NULL, releaseResources(), TRUE, writeDataCallback(), and writeFlush().
Referenced by LLImagePNG::encode().


| U32 LLPngWrapper::getFinalSize | ( | ) |
Definition at line 381 of file llpngwrapper.cpp.
References mFinalSize.
Referenced by LLImagePNG::encode().

| LLString LLPngWrapper::getErrorMessage | ( | ) |
Definition at line 387 of file llpngwrapper.cpp.
References mErrorMessage.
Referenced by LLImagePNG::decode(), LLImagePNG::encode(), and LLImagePNG::updateData().

| void LLPngWrapper::normalizeImage | ( | ) | [protected] |
Definition at line 198 of file llpngwrapper.cpp.
References mBackgroundColor, mBitDepth, mColorType, mGamma, mHasBKGD, mReadInfoPtr, and mReadPngPtr.
Referenced by readPng().

| void LLPngWrapper::updateMetaData | ( | ) | [protected] |
Definition at line 256 of file llpngwrapper.cpp.
References mBackgroundColor, mBitDepth, mChannels, mColorType, mHasBKGD, mHeight, mReadInfoPtr, mReadPngPtr, and mWidth.
Referenced by readPng().

| void LLPngWrapper::writeFlush | ( | png_structp | png_ptr | ) | [static, private] |
Definition at line 108 of file llpngwrapper.cpp.
Referenced by writePng().

| void LLPngWrapper::errorHandler | ( | png_structp | png_ptr, | |
| png_const_charp | msg | |||
| ) | [static, private] |
Definition at line 82 of file llpngwrapper.cpp.
Referenced by readPng(), and writePng().

| void LLPngWrapper::readDataCallback | ( | png_structp | png_ptr, | |
| png_bytep | dest, | |||
| png_size_t | length | |||
| ) | [static, private] |
Definition at line 89 of file llpngwrapper.cpp.
References LLPngWrapper::PngDataInfo::mData, and LLPngWrapper::PngDataInfo::mOffset.
Referenced by readPng().

| void LLPngWrapper::writeDataCallback | ( | png_structp | png_ptr, | |
| png_bytep | src, | |||
| png_size_t | length | |||
| ) | [static, private] |
Definition at line 99 of file llpngwrapper.cpp.
References LLPngWrapper::PngDataInfo::mData, and LLPngWrapper::PngDataInfo::mOffset.
Referenced by writePng().

| void LLPngWrapper::releaseResources | ( | ) | [private] |
Definition at line 357 of file llpngwrapper.cpp.
References mReadInfoPtr, mReadPngPtr, mRowPointers, mWriteInfoPtr, mWritePngPtr, and NULL.
Referenced by readPng(), writePng(), and ~LLPngWrapper().

png_structp LLPngWrapper::mReadPngPtr [private] |
Definition at line 78 of file llpngwrapper.h.
Referenced by normalizeImage(), readPng(), releaseResources(), and updateMetaData().
png_infop LLPngWrapper::mReadInfoPtr [private] |
Definition at line 79 of file llpngwrapper.h.
Referenced by normalizeImage(), readPng(), releaseResources(), and updateMetaData().
png_structp LLPngWrapper::mWritePngPtr [private] |
png_infop LLPngWrapper::mWriteInfoPtr [private] |
U8** LLPngWrapper::mRowPointers [private] |
png_uint_32 LLPngWrapper::mWidth [private] |
Definition at line 85 of file llpngwrapper.h.
Referenced by readPng(), updateMetaData(), and writePng().
png_uint_32 LLPngWrapper::mHeight [private] |
Definition at line 86 of file llpngwrapper.h.
Referenced by readPng(), updateMetaData(), and writePng().
S32 LLPngWrapper::mBitDepth [private] |
Definition at line 87 of file llpngwrapper.h.
Referenced by normalizeImage(), readPng(), updateMetaData(), and writePng().
S32 LLPngWrapper::mColorType [private] |
Definition at line 88 of file llpngwrapper.h.
Referenced by normalizeImage(), readPng(), updateMetaData(), and writePng().
S32 LLPngWrapper::mChannels [private] |
Definition at line 89 of file llpngwrapper.h.
Referenced by readPng(), updateMetaData(), and writePng().
S32 LLPngWrapper::mInterlaceType [private] |
S32 LLPngWrapper::mCompressionType [private] |
S32 LLPngWrapper::mFilterMethod [private] |
U32 LLPngWrapper::mFinalSize [private] |
Definition at line 94 of file llpngwrapper.h.
Referenced by getFinalSize(), readPng(), and writePng().
BOOL LLPngWrapper::mHasBKGD [private] |
png_color_16p LLPngWrapper::mBackgroundColor [private] |
F64 LLPngWrapper::mGamma [private] |
LLString LLPngWrapper::mErrorMessage [private] |
Definition at line 101 of file llpngwrapper.h.
Referenced by getErrorMessage(), isValidPng(), readPng(), and writePng().
1.5.5