diff options
Diffstat (limited to 'indra/llimage')
| -rw-r--r-- | indra/llimage/llimage.cpp | 9 | ||||
| -rw-r--r-- | indra/llimage/llimage.h | 1 | 
2 files changed, 10 insertions, 0 deletions
| diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp index 0fa027c9c3..ad7124b5aa 100644 --- a/indra/llimage/llimage.cpp +++ b/indra/llimage/llimage.cpp @@ -815,6 +815,15 @@ LLImageRaw::LLImageRaw(U16 width, U16 height, S8 components)  	++sRawImageCount;  } +LLImageRaw::LLImageRaw(const U8* data, U16 width, U16 height, S8 components) +    : LLImageBase() +{ +    if (allocateDataSize(width, height, components)) +    { +        memcpy(getData(), data, width * height * components); +    } +} +  LLImageRaw::LLImageRaw(U8 *data, U16 width, U16 height, S8 components, bool no_copy)  	: LLImageBase()  { diff --git a/indra/llimage/llimage.h b/indra/llimage/llimage.h index 7a588cfb03..59c192d9f8 100644 --- a/indra/llimage/llimage.h +++ b/indra/llimage/llimage.h @@ -184,6 +184,7 @@ protected:  public:  	LLImageRaw();  	LLImageRaw(U16 width, U16 height, S8 components); +    LLImageRaw(const U8* data, U16 width, U16 height, S8 components);  	LLImageRaw(U8 *data, U16 width, U16 height, S8 components, bool no_copy = false);  	// Construct using createFromFile (used by tools)  	//LLImageRaw(const std::string& filename, bool j2c_lowest_mip_only = false); | 
