Skip to content
Snippets Groups Projects
Commit 7f9856f6 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Allow 2k local bitmap preview again

parent ea417f39
No related branches found
No related tags found
2 merge requests!3Update to main branch,!2Rebase onto current main branch
......@@ -389,8 +389,8 @@ void LLGLTexture::destroyGLTexture()
void LLGLTexture::setTexelsPerImage()
{
U32 fullwidth = llmin(mFullWidth,U32(MAX_IMAGE_SIZE_DEFAULT));
U32 fullheight = llmin(mFullHeight,U32(MAX_IMAGE_SIZE_DEFAULT));
U32 fullwidth = llmin(mFullWidth,U32(MAX_IMAGE_SIZE));
U32 fullheight = llmin(mFullHeight,U32(MAX_IMAGE_SIZE));
mTexelsPerImage = (U32)fullwidth * fullheight;
}
......
......@@ -339,7 +339,7 @@ bool LLLocalBitmap::decodeBitmap(LLPointer<LLImageRaw> rawimg)
LLPointer<LLImageBMP> bmp_image = new LLImageBMP;
if (bmp_image->load(mFilename) && bmp_image->decode(rawimg, 0.0f))
{
rawimg->biasedScaleToPowerOfTwo(LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT);
rawimg->biasedScaleToPowerOfTwo(MAX_IMAGE_SIZE);
decode_successful = true;
}
break;
......@@ -351,7 +351,7 @@ bool LLLocalBitmap::decodeBitmap(LLPointer<LLImageRaw> rawimg)
if ((tga_image->load(mFilename) && tga_image->decode(rawimg))
&& ((tga_image->getComponents() == 3) || (tga_image->getComponents() == 4)))
{
rawimg->biasedScaleToPowerOfTwo(LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT);
rawimg->biasedScaleToPowerOfTwo(MAX_IMAGE_SIZE);
decode_successful = true;
}
break;
......@@ -362,7 +362,7 @@ bool LLLocalBitmap::decodeBitmap(LLPointer<LLImageRaw> rawimg)
LLPointer<LLImageJPEG> jpeg_image = new LLImageJPEG;
if (jpeg_image->load(mFilename) && jpeg_image->decode(rawimg, 0.0f))
{
rawimg->biasedScaleToPowerOfTwo(LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT);
rawimg->biasedScaleToPowerOfTwo(MAX_IMAGE_SIZE);
decode_successful = true;
}
break;
......@@ -373,7 +373,7 @@ bool LLLocalBitmap::decodeBitmap(LLPointer<LLImageRaw> rawimg)
LLPointer<LLImagePNG> png_image = new LLImagePNG;
if (png_image->load(mFilename) && png_image->decode(rawimg, 0.0f))
{
rawimg->biasedScaleToPowerOfTwo(LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT);
rawimg->biasedScaleToPowerOfTwo(MAX_IMAGE_SIZE);
decode_successful = true;
}
break;
......@@ -384,7 +384,7 @@ bool LLLocalBitmap::decodeBitmap(LLPointer<LLImageRaw> rawimg)
LLPointer<LLImageWebP> webp_image = new LLImageWebP;
if (webp_image->load(mFilename) && webp_image->decode(rawimg, 0.0f))
{
rawimg->biasedScaleToPowerOfTwo(LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT);
rawimg->biasedScaleToPowerOfTwo(MAX_IMAGE_SIZE);
decode_successful = true;
}
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment