summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexturelist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewertexturelist.cpp')
-rw-r--r--indra/newview/llviewertexturelist.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 40daac887d..f174e16624 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -1447,6 +1447,15 @@ bool LLViewerTextureList::createUploadFile(const std::string& filename,
image->setLastError("Couldn't load the image to be uploaded.");
return false;
}
+
+ // calcDataSizeJ2C assumes maximum size is 2048 and for bigger images can
+ // assign discard to bring imige to needed size, but upload does the scaling
+ // as needed, so just reset discard.
+ // Assume file is full and has 'discard' 0 data.
+ // Todo: probably a better idea to have some setMaxDimentions in J2C
+ // called when loading from a local file
+ image->setDiscardLevel(0);
+
// Decompress or expand it in a raw image structure
LLPointer<LLImageRaw> raw_image = new LLImageRaw;
if (!image->decode(raw_image, 0.0f))