Skip to content

Commit fcc8ffd

Browse files
committed
#3809 Partial revert of "Fix J2C Upload"
This partially reverts commit 8d5dab9. Apparently viewer doesn't support some jp2 variants, so I'm leaving only the fix for bulk upload.
1 parent 8d5dab9 commit fcc8ffd

File tree

4 files changed

+3
-26
lines changed

4 files changed

+3
-26
lines changed

indra/llimage/llimagedimensionsinfo.cpp

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#include "stdtypes.h"
2828

2929
#include "llimagejpeg.h"
30-
#include "llimagej2c.h"
3130

3231
#include "llimagedimensionsinfo.h"
3332

@@ -64,8 +63,6 @@ bool LLImageDimensionsInfo::load(const std::string& src_filename,U32 codec)
6463
return getImageDimensionsTga();
6564
case IMG_CODEC_JPEG:
6665
return getImageDimensionsJpeg();
67-
case IMG_CODEC_J2C:
68-
return getImageDimensionsJ2c();
6966
case IMG_CODEC_PNG:
7067
return getImageDimensionsPng();
7168
default:
@@ -217,23 +214,6 @@ bool LLImageDimensionsInfo::getImageDimensionsJpeg()
217214
return !sJpegErrorEncountered;
218215
}
219216

220-
bool LLImageDimensionsInfo::getImageDimensionsJ2c()
221-
{
222-
clean();
223-
224-
LLPointer<LLImageJ2C> jpeg_image = new LLImageJ2C;
225-
if (jpeg_image->load(mSrcFilename))
226-
{
227-
mWidth = jpeg_image->getWidth();
228-
mHeight = jpeg_image->getHeight();
229-
return true;
230-
}
231-
mWarning = "texture_load_format_error";
232-
LL_WARNS() << "J2C load error: " << LLImage::getLastThreadError() << LL_ENDL;
233-
234-
return false;
235-
}
236-
237217
bool LLImageDimensionsInfo::checkFileLength(S32 min_len)
238218
{
239219
// Make sure the file is not shorter than min_len bytes.

indra/llimage/llimagedimensionsinfo.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ class LLImageDimensionsInfo
9191
bool getImageDimensionsTga();
9292
bool getImageDimensionsPng();
9393
bool getImageDimensionsJpeg();
94-
bool getImageDimensionsJ2c();
9594

9695
S32 read_s32()
9796
{

indra/newview/llfilepicker.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ LLFilePicker LLFilePicker::sInstance;
5252

5353
#if LL_WINDOWS
5454
#define SOUND_FILTER L"Sounds (*.wav)\0*.wav\0"
55-
#define IMAGE_FILTER L"Images (*.tga; *.bmp; *.jpg; *.jpeg; *.j2c; *.jp2; *.png)\0*.tga;*.bmp;*.jpg;*.jpeg;*.j2c;*.jp2;*.png\0"
55+
#define IMAGE_FILTER L"Images (*.tga; *.bmp; *.jpg; *.jpeg; *.png)\0*.tga;*.bmp;*.jpg;*.jpeg;*.png\0"
5656
#define ANIM_FILTER L"Animations (*.bvh; *.anim)\0*.bvh;*.anim\0"
5757
#define COLLADA_FILTER L"Scene (*.dae)\0*.dae\0"
5858
#define GLTF_FILTER L"glTF (*.gltf; *.glb)\0*.gltf;*.glb\0"
@@ -559,7 +559,7 @@ bool LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename,
559559
}
560560
mOFN.lpstrDefExt = L"j2c";
561561
mOFN.lpstrFilter =
562-
L"Compressed Images (*.j2c *.jp2)\0*.j2c;*.jp2\0" \
562+
L"Compressed Images (*.j2c)\0*.j2c\0" \
563563
L"\0";
564564
break;
565565
case FFSAVE_SCRIPT:
@@ -649,8 +649,6 @@ std::unique_ptr<std::vector<std::string>> LLFilePicker::navOpenFilterProc(ELoadF
649649
case FFLOAD_IMAGE:
650650
allowedv->push_back("jpg");
651651
allowedv->push_back("jpeg");
652-
allowedv->push_back("j2c");
653-
allowedv->push_back("jp2");
654652
allowedv->push_back("bmp");
655653
allowedv->push_back("tga");
656654
allowedv->push_back("bmpf");

indra/newview/llviewermenufile.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ void LLMediaFilePicker::notify(const std::vector<std::string>& filenames)
378378

379379
#if LL_WINDOWS
380380
static std::string SOUND_EXTENSIONS = "wav";
381-
static std::string IMAGE_EXTENSIONS = "tga bmp jpg jpeg j2c jp2 png";
381+
static std::string IMAGE_EXTENSIONS = "tga bmp jpg jpeg png";
382382
static std::string ANIM_EXTENSIONS = "bvh anim";
383383
static std::string XML_EXTENSIONS = "xml";
384384
static std::string SLOBJECT_EXTENSIONS = "slobject";

0 commit comments

Comments
 (0)