summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexturelist.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2025-05-29 11:54:56 +0800
committerErik Kundiman <erik@megapahit.org>2025-05-29 11:54:56 +0800
commit11d75418fce8372e9976b069070d9d0506766d0d (patch)
treed0fc6b405dbcffefcd85f3ba52a8248c0128acde /indra/newview/llviewertexturelist.cpp
parentb6c3d47c007c59cbd3c9913a0b99f9d42bdb8d75 (diff)
parent0421e7b846b03d316740d759348c3aaa723d0b14 (diff)
Merge branch '2025.04'
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))