summaryrefslogtreecommitdiff
path: root/indra/newview/lllocalbitmaps.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2025-05-28 21:38:00 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2025-05-28 21:38:00 +0300
commitb08ba3fa7bc9e6309891e510fbfb5c4e2b5c922e (patch)
tree3e5294e3b8ff07778e6134ed9dd41458386032ac /indra/newview/lllocalbitmaps.cpp
parentb9ab6c3644da02bed6941dc8df433fb1c626f8c7 (diff)
parentde8275b14b30bf754cdba1da867cb2e6c2783639 (diff)
Merge branch 'main' into marchcat/2505-merge
# Conflicts: # .github/workflows/qatest.yaml # indra/llcommon/llsdutil.h # indra/llui/llflatlistview.h # indra/newview/llinventorybridge.cpp # indra/newview/lloutfitgallery.cpp # indra/newview/lloutfitgallery.h
Diffstat (limited to 'indra/newview/lllocalbitmaps.cpp')
-rw-r--r--indra/newview/lllocalbitmaps.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp
index 101ee215cb..e31fbb188a 100644
--- a/indra/newview/lllocalbitmaps.cpp
+++ b/indra/newview/lllocalbitmaps.cpp
@@ -38,6 +38,7 @@
/* image compression headers. */
#include "llimagebmp.h"
#include "llimagetga.h"
+#include "llimagej2c.h"
#include "llimagejpeg.h"
#include "llimagepng.h"
@@ -106,6 +107,10 @@ LLLocalBitmap::LLLocalBitmap(std::string filename)
{
mExtension = ET_IMG_JPG;
}
+ else if (temp_exten == "j2c" || temp_exten == "jp2")
+ {
+ mExtension = ET_IMG_J2C;
+ }
else if (temp_exten == "png")
{
mExtension = ET_IMG_PNG;
@@ -354,6 +359,21 @@ bool LLLocalBitmap::decodeBitmap(LLPointer<LLImageRaw> rawimg)
break;
}
+ case ET_IMG_J2C:
+ {
+ LLPointer<LLImageJ2C> jpeg_image = new LLImageJ2C;
+ if (jpeg_image->load(mFilename))
+ {
+ jpeg_image->setDiscardLevel(0);
+ if (jpeg_image->decode(rawimg, 0.0f))
+ {
+ rawimg->biasedScaleToPowerOfTwo(LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT);
+ decode_successful = true;
+ }
+ }
+ break;
+ }
+
case ET_IMG_PNG:
{
LLPointer<LLImagePNG> png_image = new LLImagePNG;