LLImageBase Class Reference

#include <llimage.h>

Inheritance diagram for LLImageBase:

Inheritance graph
[legend]
Collaboration diagram for LLImageBase:

Collaboration graph
[legend]
List of all members.

Public Types

 TYPE_NORMAL = 0
 TYPE_AVATAR_BAKE = 1
enum  { TYPE_NORMAL = 0, TYPE_AVATAR_BAKE = 1 }

Public Member Functions

 LLImageBase ()
virtual void deleteData ()
virtual U8allocateData (S32 size=-1)
virtual U8reallocateData (S32 size=-1)
virtual void dump ()
virtual void sanityCheck ()
U16 getWidth () const
U16 getHeight () const
S8 getComponents () const
S32 getDataSize () const
const U8getData () const
U8getData ()
void setSize (S32 width, S32 height, S32 ncomponents)
U8allocateDataSize (S32 width, S32 height, S32 ncomponents, S32 size=-1)

Static Public Member Functions

static const LLStringgetLastError ()
static void resetLastError ()
static BOOL setLastError (const LLString &message, const LLString &filename=LLString())
static void generateMip (const U8 *indata, U8 *mipdata, int width, int height, S32 nchannels)
static F32 calc_download_priority (F32 virtual_size, F32 visible_area, S32 bytes_sent)
static void setSizeOverride (BOOL enabled)

Public Attributes

S16 mMemType

Static Public Attributes

static LLString sLastErrorMessage
static BOOL sSizeOverride = FALSE

Protected Member Functions

virtual ~LLImageBase ()
void setDataAndSize (U8 *data, S32 size)

Private Attributes

U8mData
S32 mDataSize
U16 mWidth
U16 mHeight
S8 mComponents

Detailed Description

Definition at line 78 of file llimage.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
TYPE_NORMAL 
TYPE_AVATAR_BAKE 

Definition at line 86 of file llimage.h.


Constructor & Destructor Documentation

LLImageBase::~LLImageBase (  )  [protected, virtual]

Definition at line 63 of file llimage.cpp.

References deleteData().

LLImageBase::LLImageBase (  ) 

Definition at line 52 of file llimage.cpp.


Member Function Documentation

U8 * LLImageBase::allocateData ( S32  size = -1  )  [virtual]

Reimplemented in LLImageRaw, and LLImageFormatted.

Definition at line 122 of file llimage.cpp.

References deleteData(), FALSE, llendl, llerrs, llformat(), mComponents, mData, mDataSize, mHeight, mMemType, mWidth, resetLastError(), and sSizeOverride.

Referenced by LLImageFormatted::allocateData(), LLImageRaw::allocateData(), and allocateDataSize().

U8 * LLImageBase::allocateDataSize ( S32  width,
S32  height,
S32  ncomponents,
S32  size = -1 
)

Definition at line 184 of file llimage.cpp.

References allocateData(), and setSize().

Referenced by LLImageRaw::LLImageRaw(), LLImageGL::readBackRaw(), LLImageRaw::resize(), and LLImageRaw::scale().

F32 LLImageBase::calc_download_priority ( F32  virtual_size,
F32  visible_area,
S32  bytes_sent 
) [static]

Definition at line 1563 of file llimage.cpp.

References f.

void LLImageBase::deleteData (  )  [virtual]

Reimplemented in LLImageRaw, and LLImageFormatted.

Definition at line 114 of file llimage.cpp.

References mData, mDataSize, and NULL.

Referenced by allocateData(), LLImageFormatted::deleteData(), LLImageRaw::deleteData(), and ~LLImageBase().

void LLImageBase::dump (  )  [virtual]

Reimplemented in LLImageFormatted.

Definition at line 69 of file llimage.cpp.

References llendl, llinfos, mComponents, mData, mDataSize, mHeight, and mWidth.

Referenced by LLImageFormatted::dump().

static void LLImageBase::generateMip ( const U8 indata,
U8 mipdata,
int  width,
int  height,
S32  nchannels 
) [static]

Referenced by LLImageDXT::encode(), and LLImageGL::setImage().

S8 LLImageBase::getComponents (  )  const [inline]

Definition at line 101 of file llimage.h.

References mComponents.

Referenced by LLImageJ2C::calcDataSize(), LLImageFormatted::calcDataSize(), LLImageRaw::clear(), LLImageRaw::composite(), LLImageRaw::compositeRowScaled4onto3(), LLImageRaw::compositeScaled4onto3(), LLImageRaw::compositeUnscaled4onto3(), LLImageRaw::copy(), LLImageRaw::copyLineScaled(), LLImageRaw::copyScaled(), LLImageRaw::copyScaled3onto4(), LLImageRaw::copyScaled4onto3(), LLImageRaw::copyUnscaled(), LLImageRaw::copyUnscaled3onto4(), LLImageRaw::copyUnscaled4onto3(), LLImageGL::createGLTexture(), LLImageTGA::decode(), LLImageJPEG::decode(), LLImageDXT::decode(), LLImageTGA::decodeAndProcess(), LLImageTGA::decodeColorMap(), LLImageTGA::decodeTruecolor(), LLImageBMP::decodeTruecolor24(), LLImageTGA::decodeTruecolorNonRle(), LLImageTGA::decodeTruecolorRle15(), LLImageTGA::decodeTruecolorRle24(), LLImageTGA::decodeTruecolorRle32(), LLImageTGA::decodeTruecolorRle8(), LLImageTGA::encode(), LLImagePNG::encode(), LLImageJPEG::encode(), LLImageDXT::encode(), LLImageBMP::encode(), LLImageJ2COJ::encodeImpl(), LLImageRaw::fill(), LLImageDXT::getMipData(), LLImageRaw::getSubImage(), LLVOAvatar::onBakedTextureMasksLoaded(), LLBumpImageList::onSourceLoaded(), LLImageRaw::resize(), LLImageRaw::scale(), LLImageDXT::setFormat(), LLImageGL::setImage(), LLImagePreviewSculpted::setPreviewTarget(), LLImageRaw::setSubImage(), LLImageRaw::verticalFlip(), and LLPngWrapper::writePng().

U8* LLImageBase::getData (  )  [inline]

Definition at line 105 of file llimage.h.

References mData.

const U8* LLImageBase::getData (  )  const [inline]

Definition at line 104 of file llimage.h.

References mData.

Referenced by LLImageFormatted::appendData(), LLImageRaw::clear(), LLImageRaw::compositeScaled4onto3(), LLImageRaw::compositeUnscaled4onto3(), LLImageDXT::convertToDXR(), LLImageFormatted::copyData(), LLImageRaw::copyScaled(), LLImageRaw::copyUnscaled(), LLImageRaw::copyUnscaled3onto4(), LLImageRaw::copyUnscaled4onto3(), LLImageGL::createGLTexture(), LLImageTGA::decode(), LLImagePNG::decode(), LLImageJPEG::decode(), LLImageJ2C::decode(), LLImageDXT::decode(), LLImageBMP::decode(), LLImageTGA::decodeAndProcess(), LLImageTGA::decodeColorMap(), LLImageJ2COJ::decodeImpl(), LLImageTGA::decodeTruecolorNonRle(), LLImageTGA::decodeTruecolorRle15(), LLImageTGA::decodeTruecolorRle24(), LLImageTGA::decodeTruecolorRle32(), LLImageTGA::decodeTruecolorRle8(), LLImageTGA::encode(), LLImagePNG::encode(), LLImageJPEG::encode(), LLImageDXT::encode(), LLImageBMP::encode(), LLImageJ2COJ::encodeImpl(), LLImageRaw::fill(), LLImageDXT::getMipData(), LLImageRaw::getSubImage(), LLImageRaw::LLImageRaw(), LLVOAvatar::onBakedTextureMasksLoaded(), LLBumpImageList::onSourceLoaded(), LLViewerWindow::rawSnapshot(), LLImageGL::readBackRaw(), LLPngWrapper::readPng(), LLImageFormatted::save(), LLImageRaw::scale(), LLImageFormatted::setData(), LLImageGL::setImage(), LLImagePreviewSculpted::setPreviewTarget(), LLImageGL::setSubImage(), LLImageRaw::setSubImage(), LLImageTGA::updateData(), LLImagePNG::updateData(), LLImageJPEG::updateData(), LLImageJ2C::updateData(), LLImageDXT::updateData(), LLImageBMP::updateData(), LLImageJ2C::validate(), LLImageRaw::verticalFlip(), and LLPngWrapper::writePng().

S32 LLImageBase::getDataSize (  )  const [inline]

Definition at line 102 of file llimage.h.

References mDataSize.

Referenced by LLImageFormatted::allocateData(), LLImageRaw::allocateData(), LLImageFormatted::appendData(), LLImageDXT::convertToDXR(), LLImageFormatted::copyData(), LLImageTGA::decode(), LLImagePNG::decode(), LLImageJPEG::decode(), LLImageJ2C::decode(), LLImageDXT::decode(), LLImageBMP::decode(), LLImageTGA::decodeAndProcess(), LLImageTGA::decodeTruecolorRle15(), LLImageTGA::decodeTruecolorRle24(), LLImageTGA::decodeTruecolorRle32(), LLImageTGA::decodeTruecolorRle8(), LLImageFormatted::deleteData(), LLImageRaw::deleteData(), LLBumpImageList::onSourceLoaded(), LLImageFormatted::reallocateData(), LLImageRaw::reallocateData(), LLImageFormatted::save(), LLImageFormatted::setData(), LLImageTGA::updateData(), LLImagePNG::updateData(), LLImageJPEG::updateData(), LLImageJ2C::updateData(), LLImageDXT::updateData(), LLImageBMP::updateData(), and LLImageJ2C::validate().

U16 LLImageBase::getHeight (  )  const [inline]

Definition at line 100 of file llimage.h.

References mHeight.

Referenced by LLImageRaw::biasedScaleToPowerOfTwo(), LLImageJ2C::calcDataSize(), LLImageDXT::calcDataSize(), LLImageFormatted::calcDataSize(), LLImageRaw::clear(), LLImageRaw::composite(), LLImageRaw::compositeScaled4onto3(), LLImageRaw::compositeUnscaled4onto3(), LLImageRaw::contractToPowerOfTwo(), LLImageDXT::convertToDXR(), LLImageRaw::copy(), LLImageRaw::copyScaled(), LLImageRaw::copyScaled3onto4(), LLImageRaw::copyScaled4onto3(), LLImageRaw::copyUnscaled(), LLImageRaw::copyUnscaled3onto4(), LLImageRaw::copyUnscaled4onto3(), LLImageGL::createGLTexture(), LLImageTGA::decode(), LLImageJPEG::decode(), LLImageDXT::decode(), LLImageBMP::decode(), LLImageTGA::decodeAndProcess(), LLImageTGA::decodeColorMap(), LLImageBMP::decodeColorMask16(), LLImageBMP::decodeColorMask32(), LLImageBMP::decodeColorTable8(), LLImageTGA::decodeTruecolor(), LLImageBMP::decodeTruecolor24(), LLImageTGA::decodeTruecolorNonRle(), LLImageTGA::decodeTruecolorRle15(), LLImageTGA::decodeTruecolorRle24(), LLImageTGA::decodeTruecolorRle32(), LLImageTGA::decodeTruecolorRle8(), LLImageTGA::encode(), LLImagePNG::encode(), LLImageJPEG::encode(), LLImageDXT::encode(), LLImageBMP::encode(), LLImageJ2COJ::encodeImpl(), LLImageRaw::expandToPowerOfTwo(), LLImageRaw::fill(), LLImageDXT::getMipOffset(), LLVOAvatar::onBakedTextureMasksLoaded(), LLBumpImageList::onSourceLoaded(), LLViewerWindow::rawSnapshot(), LLImageRaw::resize(), LLImageRaw::scale(), LLImageGL::setImage(), LLImagePreviewSculpted::setPreviewTarget(), LLImageGL::setSubImage(), LLImageRaw::verticalFlip(), and LLPngWrapper::writePng().

static const LLString& LLImageBase::getLastError (  )  [inline, static]

Definition at line 115 of file llimage.h.

References sLastErrorMessage.

Referenced by handle_compress_image(), and upload_new_resource().

U16 LLImageBase::getWidth (  )  const [inline]

Definition at line 99 of file llimage.h.

References mWidth.

Referenced by LLImageRaw::biasedScaleToPowerOfTwo(), LLImageJ2C::calcDataSize(), LLImageDXT::calcDataSize(), LLImageFormatted::calcDataSize(), LLImageRaw::clear(), LLImageRaw::composite(), LLImageRaw::compositeScaled4onto3(), LLImageRaw::compositeUnscaled4onto3(), LLImageRaw::contractToPowerOfTwo(), LLImageDXT::convertToDXR(), LLImageRaw::copy(), LLImageRaw::copyScaled(), LLImageRaw::copyScaled3onto4(), LLImageRaw::copyScaled4onto3(), LLImageRaw::copyUnscaled(), LLImageRaw::copyUnscaled3onto4(), LLImageRaw::copyUnscaled4onto3(), LLImageGL::createGLTexture(), LLImageTGA::decode(), LLImageJPEG::decode(), LLImageDXT::decode(), LLImageBMP::decode(), LLImageTGA::decodeAndProcess(), LLImageTGA::decodeColorMap(), LLImageBMP::decodeColorMask16(), LLImageBMP::decodeColorMask32(), LLImageBMP::decodeColorTable8(), LLImageTGA::decodeTruecolor(), LLImageBMP::decodeTruecolor24(), LLImageTGA::decodeTruecolorNonRle(), LLImageTGA::decodeTruecolorRle15(), LLImageTGA::decodeTruecolorRle24(), LLImageTGA::decodeTruecolorRle32(), LLImageTGA::decodeTruecolorRle8(), LLImageTGA::encode(), LLImagePNG::encode(), LLImageJPEG::encode(), LLImageDXT::encode(), LLImageBMP::encode(), LLImageJ2COJ::encodeImpl(), LLImageRaw::expandToPowerOfTwo(), LLImageRaw::fill(), LLImageDXT::getMipOffset(), LLImageRaw::getSubImage(), LLVOAvatar::onBakedTextureMasksLoaded(), LLBumpImageList::onSourceLoaded(), LLViewerWindow::rawSnapshot(), LLImageRaw::resize(), LLImageRaw::scale(), LLImageGL::setImage(), LLImagePreviewSculpted::setPreviewTarget(), LLImageGL::setSubImage(), LLImageRaw::setSubImage(), LLImageRaw::verticalFlip(), and LLPngWrapper::writePng().

U8 * LLImageBase::reallocateData ( S32  size = -1  )  [virtual]

Reimplemented in LLImageRaw, and LLImageFormatted.

Definition at line 156 of file llimage.cpp.

References llendl, llmin(), llwarns, mData, mDataSize, mMemType, and S32.

Referenced by LLImageFormatted::reallocateData(), and LLImageRaw::reallocateData().

static void LLImageBase::resetLastError (  )  [inline, static]

Definition at line 116 of file llimage.h.

References sLastErrorMessage.

Referenced by allocateData(), LLImagePNG::decode(), LLImageJPEG::decode(), LLImageJ2C::decode(), LLImageBMP::decode(), LLImagePNG::encode(), LLImageJPEG::encode(), LLImageBMP::encode(), LLImageFormatted::load(), LLImageJ2C::loadAndValidate(), LLImageFormatted::save(), LLImageTGA::updateData(), LLImagePNG::updateData(), LLImageJPEG::updateData(), LLImageJ2C::updateData(), LLImageDXT::updateData(), and LLImageBMP::updateData().

void LLImageBase::sanityCheck (  )  [virtual]

Reimplemented in LLImageFormatted.

Definition at line 80 of file llimage.cpp.

References llendl, llerrs, MAX_IMAGE_COMPONENTS, MAX_IMAGE_DATA_SIZE, MAX_IMAGE_SIZE, mComponents, mData, mDataSize, mHeight, mWidth, and S32.

Referenced by LLImageFormatted::sanityCheck().

void LLImageBase::setDataAndSize ( U8 data,
S32  size 
) [inline, protected]

Definition at line 112 of file llimage.h.

References mData, and mDataSize.

Referenced by LLImageFormatted::setData().

BOOL LLImageBase::setLastError ( const LLString message,
const LLString filename = LLString() 
) [static]

Definition at line 101 of file llimage.cpp.

References FALSE, llendl, llwarns, and sLastErrorMessage.

Referenced by LLImageTGA::decode(), LLImagePNG::decode(), LLImageJPEG::decode(), LLImageJ2C::decode(), LLImageDXT::decode(), LLImageBMP::decode(), LLImageTGA::decodeAndProcess(), LLImagePNG::encode(), LLImageJPEG::encode(), LLImageFormatted::load(), LLImageJ2C::loadAndValidate(), LLImageFormatted::save(), LLImageTGA::updateData(), LLImagePNG::updateData(), LLImageJPEG::updateData(), LLImageJ2C::updateData(), LLImageDXT::updateData(), LLImageBMP::updateData(), and LLImageJ2C::validate().

void LLImageBase::setSize ( S32  width,
S32  height,
S32  ncomponents 
)

Definition at line 177 of file llimage.cpp.

References mComponents, mHeight, and mWidth.

Referenced by allocateDataSize(), LLImageJPEG::decode(), LLImageTGA::encode(), LLImagePNG::encode(), LLImageJPEG::encode(), LLImageDXT::encode(), LLImageBMP::encode(), LLImageTGA::updateData(), LLImagePNG::updateData(), LLImageJPEG::updateData(), LLImageDXT::updateData(), and LLImageBMP::updateData().

static void LLImageBase::setSizeOverride ( BOOL  enabled  )  [inline, static]

Definition at line 125 of file llimage.h.

References sSizeOverride.

Referenced by LLFileTakeSnapshotToDisk::handleEvent(), and LLViewerWindow::saveImageNumbered().


Member Data Documentation

S8 LLImageBase::mComponents [private]

Definition at line 134 of file llimage.h.

Referenced by allocateData(), dump(), getComponents(), sanityCheck(), and setSize().

U8* LLImageBase::mData [private]

Definition at line 128 of file llimage.h.

Referenced by allocateData(), deleteData(), dump(), getData(), reallocateData(), sanityCheck(), and setDataAndSize().

S32 LLImageBase::mDataSize [private]

Definition at line 129 of file llimage.h.

Referenced by allocateData(), deleteData(), dump(), getDataSize(), reallocateData(), sanityCheck(), and setDataAndSize().

U16 LLImageBase::mHeight [private]

Definition at line 132 of file llimage.h.

Referenced by allocateData(), dump(), getHeight(), sanityCheck(), and setSize().

S16 LLImageBase::mMemType

Definition at line 137 of file llimage.h.

Referenced by allocateData(), LLImageRaw::compositeScaled4onto3(), LLImageRaw::copyScaled(), LLImageJ2C::decode(), LLImageJ2C::encode(), LLImageRaw::getSubImage(), LLImageFormatted::LLImageFormatted(), LLImageRaw::LLImageRaw(), reallocateData(), LLImageRaw::scale(), LLImageJ2C::validate(), and LLImageRaw::verticalFlip().

U16 LLImageBase::mWidth [private]

Definition at line 131 of file llimage.h.

Referenced by allocateData(), dump(), getWidth(), sanityCheck(), and setSize().

LLString LLImageBase::sLastErrorMessage [static]

Definition at line 139 of file llimage.h.

Referenced by getLastError(), resetLastError(), and setLastError().

BOOL LLImageBase::sSizeOverride = FALSE [static]

Definition at line 141 of file llimage.h.

Referenced by allocateData(), and setSizeOverride().


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:25 2010 for Second Life Viewer by  doxygen 1.4.7