summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexturelist.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2025-05-29 12:35:27 +0800
committerErik Kundiman <erik@megapahit.org>2025-05-29 12:35:27 +0800
commitd046d7e0e1e3ccbffb42d22fe52aa73d0c170b8e (patch)
tree7c2023e55955c9aed55db9331bae164a386a2d21 /indra/newview/llviewertexturelist.cpp
parent6641e36082f27faa282a0af6f88f381ffc97e179 (diff)
parent11d75418fce8372e9976b069070d9d0506766d0d (diff)
Merge branch 'main' into 2025.05
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))