LLImageRaw Class Reference

#include <llimage.h>

Inheritance diagram for LLImageRaw:

Inheritance graph
[legend]
Collaboration diagram for LLImageRaw:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 LLImageRaw ()
 LLImageRaw (U16 width, U16 height, S8 components)
 LLImageRaw (U8 *data, U16 width, U16 height, S8 components)
 LLImageRaw (const LLString &filename, bool j2c_lowest_mip_only=false)
void deleteData ()
U8allocateData (S32 size=-1)
U8reallocateData (S32 size)
BOOL resize (U16 width, U16 height, S8 components)
U8getSubImage (U32 x_pos, U32 y_pos, U32 width, U32 height) const
BOOL setSubImage (U32 x_pos, U32 y_pos, U32 width, U32 height, const U8 *data, U32 stride=0, BOOL reverse_y=FALSE)
void clear (U8 r=0, U8 g=0, U8 b=0, U8 a=255)
void verticalFlip ()
void expandToPowerOfTwo (S32 max_dim=MAX_IMAGE_SIZE, BOOL scale_image=TRUE)
void contractToPowerOfTwo (S32 max_dim=MAX_IMAGE_SIZE, BOOL scale_image=TRUE)
void biasedScaleToPowerOfTwo (S32 max_dim=MAX_IMAGE_SIZE)
void scale (S32 new_width, S32 new_height, BOOL scale_image=TRUE)
void fill (const LLColor4U &color)
void copy (LLImageRaw *src)
void copyUnscaled (LLImageRaw *src)
void copyUnscaled4onto3 (LLImageRaw *src)
void copyUnscaled3onto4 (LLImageRaw *src)
void copyScaled (LLImageRaw *src)
void copyScaled3onto4 (LLImageRaw *src)
void copyScaled4onto3 (LLImageRaw *src)
void composite (LLImageRaw *src)
void compositeScaled4onto3 (LLImageRaw *src)
void compositeUnscaled4onto3 (LLImageRaw *src)

Static Public Attributes

static S32 sGlobalRawMemory = 0
static S32 sRawImageCount = 0

Protected Member Functions

 ~LLImageRaw ()
bool createFromFile (const LLString &filename, bool j2c_lowest_mip_only=false)
void copyLineScaled (U8 *in, U8 *out, S32 in_pixel_len, S32 out_pixel_len, S32 in_pixel_step, S32 out_pixel_step)
void compositeRowScaled4onto3 (U8 *in, U8 *out, S32 in_pixel_len, S32 out_pixel_len)
U8 fastFractionalMult (U8 a, U8 b)


Detailed Description

Definition at line 150 of file llimage.h.


Constructor & Destructor Documentation

LLImageRaw::~LLImageRaw (  )  [protected]

Definition at line 259 of file llimage.cpp.

References deleteData(), and sRawImageCount.

Here is the call graph for this function:

LLImageRaw::LLImageRaw (  ) 

Definition at line 228 of file llimage.cpp.

References LLImageBase::mMemType, LLMemType::MTYPE_IMAGERAW, and sRawImageCount.

LLImageRaw::LLImageRaw ( U16  width,
U16  height,
S8  components 
)

Definition at line 235 of file llimage.cpp.

References LLImageBase::allocateDataSize(), llassert, MAX_IMAGE_DATA_SIZE, LLImageBase::mMemType, LLMemType::MTYPE_IMAGERAW, S32, and sRawImageCount.

Here is the call graph for this function:

LLImageRaw::LLImageRaw ( U8 data,
U16  width,
U16  height,
S8  components 
)

Definition at line 244 of file llimage.cpp.

References LLImageBase::allocateDataSize(), LLImageBase::getData(), LLImageBase::mMemType, LLMemType::MTYPE_IMAGERAW, and sRawImageCount.

Here is the call graph for this function:

LLImageRaw::LLImageRaw ( const LLString filename,
bool  j2c_lowest_mip_only = false 
)

Definition at line 253 of file llimage.cpp.

References createFromFile().

Here is the call graph for this function:


Member Function Documentation

void LLImageRaw::deleteData (  )  [virtual]

Reimplemented from LLImageBase.

Definition at line 285 of file llimage.cpp.

References LLImageBase::deleteData(), LLImageBase::getDataSize(), and sGlobalRawMemory.

Referenced by createFromFile(), LLImageJ2C::decodeChannels(), LLImageGL::readBackRaw(), resize(), scale(), and ~LLImageRaw().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Reimplemented from LLImageBase.

Definition at line 268 of file llimage.cpp.

References LLImageBase::allocateData(), LLImageBase::getDataSize(), and sGlobalRawMemory.

Here is the call graph for this function:

U8 * LLImageRaw::reallocateData ( S32  size  )  [virtual]

Reimplemented from LLImageBase.

Definition at line 276 of file llimage.cpp.

References LLImageBase::getDataSize(), LLImageBase::reallocateData(), and sGlobalRawMemory.

Here is the call graph for this function:

BOOL LLImageRaw::resize ( U16  width,
U16  height,
S8  components 
)

U8 * LLImageRaw::getSubImage ( U32  x_pos,
U32  y_pos,
U32  width,
U32  height 
) const

Definition at line 305 of file llimage.cpp.

References LLImageBase::getComponents(), LLImageBase::getData(), LLImageBase::getWidth(), i, llendl, llerrs, LLImageBase::mMemType, and NULL.

Here is the call graph for this function:

BOOL LLImageRaw::setSubImage ( U32  x_pos,
U32  y_pos,
U32  width,
U32  height,
const U8 data,
U32  stride = 0,
BOOL  reverse_y = FALSE 
)

Definition at line 326 of file llimage.cpp.

References FALSE, LLImageBase::getComponents(), LLImageBase::getData(), LLImageBase::getWidth(), i, and TRUE.

Here is the call graph for this function:

void LLImageRaw::clear ( U8  r = 0,
U8  g = 0,
U8  b = 0,
U8  a = 255 
)

Definition at line 353 of file llimage.cpp.

References LLImageBase::getComponents(), LLImageBase::getData(), LLImageBase::getHeight(), LLImageBase::getWidth(), and llassert.

Here is the call graph for this function:

void LLImageRaw::verticalFlip (  ) 

Definition at line 388 of file llimage.cpp.

References LLImageBase::getComponents(), LLImageBase::getData(), LLImageBase::getHeight(), LLImageBase::getWidth(), llendl, llerrs, LLImageBase::mMemType, and S32.

Referenced by LLImageBMP::decode(), LLImageTGA::decodeColorMap(), and LLImageTGA::decodeTruecolor().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLImageRaw::expandToPowerOfTwo ( S32  max_dim = MAX_IMAGE_SIZE,
BOOL  scale_image = TRUE 
)

Definition at line 411 of file llimage.cpp.

References LLImageBase::getHeight(), LLImageBase::getWidth(), MIN_IMAGE_SIZE, S32, and scale().

Here is the call graph for this function:

void LLImageRaw::contractToPowerOfTwo ( S32  max_dim = MAX_IMAGE_SIZE,
BOOL  scale_image = TRUE 
)

Definition at line 430 of file llimage.cpp.

References LLImageBase::getHeight(), LLImageBase::getWidth(), MIN_IMAGE_SIZE, S32, and scale().

Here is the call graph for this function:

void LLImageRaw::biasedScaleToPowerOfTwo ( S32  max_dim = MAX_IMAGE_SIZE  ) 

Definition at line 449 of file llimage.cpp.

References LLImageBase::getHeight(), LLImageBase::getWidth(), MIN_IMAGE_SIZE, S32, and scale().

Here is the call graph for this function:

void LLImageRaw::scale ( S32  new_width,
S32  new_height,
BOOL  scale_image = TRUE 
)

void LLImageRaw::fill ( const LLColor4U color  ) 

Definition at line 608 of file llimage.cpp.

References LLImageBase::getComponents(), LLImageBase::getData(), LLImageBase::getHeight(), LLImageBase::getWidth(), i, LLColor4U::mAll, LLColor4U::mV, and S32.

Here is the call graph for this function:

void LLImageRaw::copy ( LLImageRaw src  ) 

Definition at line 637 of file llimage.cpp.

References copyScaled(), copyScaled3onto4(), copyScaled4onto3(), copyUnscaled(), copyUnscaled3onto4(), copyUnscaled4onto3(), LLImageBase::getComponents(), LLImageBase::getHeight(), LLImageBase::getWidth(), and llassert.

Referenced by LLImageTGA::decodeTruecolor(), and LLVOSky::updateSky().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLImageRaw::copyUnscaled ( LLImageRaw src  ) 

Definition at line 684 of file llimage.cpp.

References LLImageBase::getComponents(), LLImageBase::getData(), LLImageBase::getHeight(), LLImageBase::getWidth(), and llassert.

Referenced by composite(), and copy().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLImageRaw::copyUnscaled4onto3 ( LLImageRaw src  ) 

Definition at line 721 of file llimage.cpp.

References LLImageBase::getComponents(), LLImageBase::getData(), LLImageBase::getHeight(), LLImageBase::getWidth(), i, llassert, and S32.

Referenced by copy().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLImageRaw::copyUnscaled3onto4 ( LLImageRaw src  ) 

Definition at line 743 of file llimage.cpp.

References LLImageBase::getComponents(), LLImageBase::getData(), LLImageBase::getHeight(), LLImageBase::getWidth(), i, llassert, and S32.

Referenced by copy().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLImageRaw::copyScaled ( LLImageRaw src  ) 

Definition at line 766 of file llimage.cpp.

References copyLineScaled(), LLImageBase::getComponents(), LLImageBase::getData(), LLImageBase::getHeight(), LLImageBase::getWidth(), llassert_always, LLImageBase::mMemType, and S32.

Referenced by composite(), copy(), copyScaled3onto4(), and copyScaled4onto3().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLImageRaw::copyScaled3onto4 ( LLImageRaw src  ) 

Definition at line 697 of file llimage.cpp.

References copyScaled(), LLImageBase::getComponents(), LLImageBase::getHeight(), LLImageBase::getWidth(), and llassert.

Referenced by copy().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLImageRaw::copyScaled4onto3 ( LLImageRaw src  ) 

Definition at line 709 of file llimage.cpp.

References copyScaled(), LLImageBase::getComponents(), LLImageBase::getHeight(), LLImageBase::getWidth(), and llassert.

Referenced by copy().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLImageRaw::composite ( LLImageRaw src  ) 

void LLImageRaw::compositeScaled4onto3 ( LLImageRaw src  ) 

Definition at line 526 of file llimage.cpp.

References compositeRowScaled4onto3(), copyLineScaled(), LLImageBase::getComponents(), LLImageBase::getData(), LLImageBase::getHeight(), LLImageBase::getWidth(), llassert, llendl, llinfos, LLImageBase::mMemType, and S32.

Referenced by composite().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLImageRaw::compositeUnscaled4onto3 ( LLImageRaw src  ) 

Definition at line 555 of file llimage.cpp.

References fastFractionalMult(), LLImageBase::getComponents(), LLImageBase::getData(), LLImageBase::getHeight(), LLImageBase::getWidth(), llassert, and S32.

Referenced by composite().

Here is the call graph for this function:

Here is the caller graph for this function:

bool LLImageRaw::createFromFile ( const LLString filename,
bool  j2c_lowest_mip_only = false 
) [protected]

void LLImageRaw::copyLineScaled ( U8 in,
U8 out,
S32  in_pixel_len,
S32  out_pixel_len,
S32  in_pixel_step,
S32  out_pixel_step 
) [protected]

Definition at line 876 of file llimage.cpp.

References LLImageBase::getComponents(), i, llassert, llfloor(), llround(), r, and S32.

Referenced by compositeScaled4onto3(), copyScaled(), and scale().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLImageRaw::compositeRowScaled4onto3 ( U8 in,
U8 out,
S32  in_pixel_len,
S32  out_pixel_len 
) [protected]

Definition at line 991 of file llimage.cpp.

References fastFractionalMult(), LLImageBase::getComponents(), llassert, llround(), r, and S32.

Referenced by compositeScaled4onto3().

Here is the call graph for this function:

Here is the caller graph for this function:

U8 LLImageRaw::fastFractionalMult ( U8  a,
U8  b 
) [inline, protected]

Definition at line 483 of file llimage.cpp.

References i.

Referenced by compositeRowScaled4onto3(), and compositeUnscaled4onto3().

Here is the caller graph for this function:


Member Data Documentation


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

Generated on Fri May 16 08:49:48 2008 for SecondLife by  doxygen 1.5.5