diff options
author | Merov Linden <merov@lindenlab.com> | 2012-03-15 13:01:14 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2012-03-15 13:01:14 -0700 |
commit | bc6f669ff41db304723428746868d79d3f3b48da (patch) | |
tree | d64467193799467feae4e3f4bc96bbba06a6122f /indra/llimage/llimagej2c.cpp | |
parent | 8efce456afa2f63038594752f491b521e168fbdf (diff) |
SH-3047 : Read the number of levels from the j2c image header instead of relying on hacked computation based on width / height.
Diffstat (limited to 'indra/llimage/llimagej2c.cpp')
-rw-r--r-- | indra/llimage/llimagej2c.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/indra/llimage/llimagej2c.cpp b/indra/llimage/llimagej2c.cpp index cc8cb66d73..fbf4b769e1 100644 --- a/indra/llimage/llimagej2c.cpp +++ b/indra/llimage/llimagej2c.cpp @@ -142,6 +142,7 @@ BOOL LLImageJ2C::updateData() BOOL LLImageJ2C::initDecode(LLImageRaw &raw_image, int discard_level, int* region) { + setDiscardLevel(discard_level != -1 ? discard_level : 0); return mImpl->initDecode(*this,raw_image,discard_level,region); } @@ -286,6 +287,8 @@ S32 LLImageJ2C::calcHeaderSize() // calcDataSize() returns how many bytes to read // to load discard_level (including header and higher discard levels) +// *TODO: This is deeply wrong. That size should be taken from the image file header or other +// relevant infos. In any case, this is only an approximation. S32 LLImageJ2C::calcDataSize(S32 discard_level) { discard_level = llclamp(discard_level, 0, MAX_DISCARD_LEVEL); |