diff options
author | Merov Linden <merov@lindenlab.com> | 2012-03-20 20:19:47 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2012-03-20 20:19:47 -0700 |
commit | 1ebcb8039369175f7f43fc19956f32c923cfe1ba (patch) | |
tree | 231d7801a87702d42f5d51e642d9ba89600eefb7 /indra/llkdu | |
parent | 4c15635527800120f98aa1402d71baa4b9fbc932 (diff) | |
parent | 4f19eb3951366ca6a3db9de4a72cb0c1f8bc89d1 (diff) |
SH-3047 : Pull changes into viewer-thx1130 repo.
Diffstat (limited to 'indra/llkdu')
-rw-r--r-- | indra/llkdu/llimagej2ckdu.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/indra/llkdu/llimagej2ckdu.cpp b/indra/llkdu/llimagej2ckdu.cpp index c156ed0cef..eed4139f3f 100644 --- a/indra/llkdu/llimagej2ckdu.cpp +++ b/indra/llkdu/llimagej2ckdu.cpp @@ -291,8 +291,13 @@ void LLImageJ2CKDU::setupCodeStream(LLImageJ2C &base, BOOL keep_codestream, ECod } } - base.setSize(dims.size.x, dims.size.y, components); + // Get the number of resolution levels in that image + mLevels = mCodeStreamp->get_min_dwt_levels(); + // Set the base dimensions + base.setSize(dims.size.x, dims.size.y, components); + base.setLevels(mLevels); + if (!keep_codestream) { mCodeStreamp->destroy(); @@ -394,12 +399,9 @@ BOOL LLImageJ2CKDU::initDecode(LLImageJ2C &base, LLImageRaw &raw_image, F32 deco // Resize raw_image according to the image to be decoded kdu_dims dims; mCodeStreamp->get_dims(0,dims); - // *TODO: Use the real number of levels read from the file throughout the code instead of relying on an infered value from dimensions - //S32 levels = mCodeStreamp->get_min_dwt_levels(); S32 channels = base.getComponents() - first_channel; channels = llmin(channels,max_channel_count); raw_image.resize(dims.size.x, dims.size.y, channels); - //llinfos << "j2c image dimension: width = " << dims.size.x << ", height = " << dims.size.y << ", channels = " << channels << ", levels = " << levels << llendl; if (!mTileIndicesp) { |