From c5de146e6ac9a7d2e58cf99d7df596a56d2fca30 Mon Sep 17 00:00:00 2001 From: Hecklezz Date: Wed, 28 Jan 2026 02:14:24 +1000 Subject: [PATCH] [FIRE-36296] Bulk uploading small textures now upload lossless if LosslessJ2CUpload is true --- indra/newview/llviewermenufile.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 7f813d0b85..6860a6203f 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -652,6 +652,15 @@ void do_bulk_upload(std::vector filenames, bool allow_2k) LLPointer formatted = new LLImageJ2C; + // [FIRE-36296] Bulk uploading small textures should use lossless by default + static LLCachedControl lossless_j2c_upload(gSavedSettings, "LosslessJ2CUpload", true); + if (lossless_j2c_upload && + (raw_image->getWidth() * raw_image->getHeight() <= LL_IMAGE_REZ_LOSSLESS_CUTOFF * LL_IMAGE_REZ_LOSSLESS_CUTOFF)) + { + formatted->setReversible(true); + } + // + if (formatted->encode(raw_image, 0.0f)) { LLFileSystem fmt_file(new_asset_id, LLAssetType::AT_TEXTURE, LLFileSystem::WRITE);