diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2022-09-02 19:56:35 +0100 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2022-09-02 19:56:35 +0100 |
commit | 852d552ca205506bba3dcd5a31a012f1acdf1cc4 (patch) | |
tree | bc4e2776dec44c7b7271cc5ad4b460fa29b100db /indra/newview/llviewertexturelist.cpp | |
parent | 3c3442cbbc38beff1ab82ffcc7f81390c7979361 (diff) | |
parent | bded34a8615a2adceb2eda2f2d85501a70990efe (diff) |
Merge branch 'DRTVWR-559' of https://bitbucket.org/lindenlab/viewer into DRTVWR-559
Diffstat (limited to 'indra/newview/llviewertexturelist.cpp')
-rw-r--r-- | indra/newview/llviewertexturelist.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 9cbbf1c276..511df4bd79 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1224,15 +1224,18 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename, } // note: modifies the argument raw_image!!!! -LLPointer<LLImageJ2C> LLViewerTextureList::convertToUploadFile(LLPointer<LLImageRaw> raw_image, const S32 max_image_dimentions) +LLPointer<LLImageJ2C> LLViewerTextureList::convertToUploadFile(LLPointer<LLImageRaw> raw_image, const S32 max_image_dimentions, bool force_lossless) { LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; raw_image->biasedScaleToPowerOfTwo(max_image_dimentions); LLPointer<LLImageJ2C> compressedImage = new LLImageJ2C(); - if (gSavedSettings.getBOOL("LosslessJ2CUpload") && - (raw_image->getWidth() * raw_image->getHeight() <= LL_IMAGE_REZ_LOSSLESS_CUTOFF * LL_IMAGE_REZ_LOSSLESS_CUTOFF)) - compressedImage->setReversible(TRUE); + if (force_lossless || + (gSavedSettings.getBOOL("LosslessJ2CUpload") && + (raw_image->getWidth() * raw_image->getHeight() <= LL_IMAGE_REZ_LOSSLESS_CUTOFF * LL_IMAGE_REZ_LOSSLESS_CUTOFF))) + { + compressedImage->setReversible(TRUE); + } if (gSavedSettings.getBOOL("Jpeg2000AdvancedCompression")) |