diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2025-03-28 21:49:58 +0200 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-03-31 09:56:10 +0300 |
commit | 8d5dab9f67d54ce20768c0ccda58f27693cb20c9 (patch) | |
tree | 0fe79bf228132552160f2b0dd60dfa389a5c9035 /indra/newview/llviewertexturelist.cpp | |
parent | b1822e36e531a3c423404f0aa875cbf6949061a0 (diff) |
#3809 Fix J2C Upload
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 ae723b4068..9f23d39506 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1419,6 +1419,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)) |