diff options
author | Erik Kundiman <erik@megapahit.org> | 2025-04-19 21:14:33 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2025-04-19 21:14:33 +0800 |
commit | 9595a3dee48eb8b7f10cad02b4ebdda5f596664e (patch) | |
tree | aadbfc379b2028e1f22662d38b1094c745064ad9 /indra/newview/llviewertexturelist.cpp | |
parent | ad9c801edb13568657c0964ebfb74257da6d9e00 (diff) | |
parent | 9a333e65c4019540d5675e72ac57ef5ab106aab0 (diff) |
Merge tag 'Second_Life_Release#9a333e65-2025.04' into 2025.04
Diffstat (limited to 'indra/newview/llviewertexturelist.cpp')
-rw-r--r-- | indra/newview/llviewertexturelist.cpp | 9 |
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)) |