diff options
author | Jonathan "Geenz" Goodman <geenz@lindenlab.com> | 2025-05-31 09:33:42 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-31 09:33:42 -0400 |
commit | c88f5d26dc894f8d82b948c387a9a3b70862731b (patch) | |
tree | fd96237f2a595396cd4a2861f976483ea8ef1544 /indra/newview/llviewertexturelist.cpp | |
parent | aeefc73129978f6f2c1ba8caaff2750eff2cfbb3 (diff) | |
parent | 39625d10b8a50ed4ca91d618d6ad638b99087e35 (diff) |
Merge pull request #4176 from secondlife/geenz/2025.04-to-develop
Merge 2025.04 into develop
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 fb8e8e7bf3..2f42c4e238 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1439,6 +1439,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)) |