summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim ProductEngine <vsavchuk@productengine.com>2011-12-14 17:12:40 +0200
committerVadim ProductEngine <vsavchuk@productengine.com>2011-12-14 17:12:40 +0200
commit6cefa466361e37df8082f86a21a954199fbf14a4 (patch)
tree6953a9b7a06966147981b182a0a7b9b026770f2b
parent82f043c3338fdcf35e42dbe2ed512eb39808b90e (diff)
EXP-1635 FIXED Made it clear that inventory snapshots are limited to 512x512 px.
-rw-r--r--indra/newview/llfloatersnapshot.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index b7145d43f6..6532a27b9d 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -832,7 +832,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
previewp->mPreviewImage->getHeight(),
previewp->mPreviewImage->getComponents());
- scaled->biasedScaleToPowerOfTwo(512);
+ scaled->biasedScaleToPowerOfTwo(MAX_TEXTURE_SIZE);
previewp->setImageScaled(TRUE);
if (formatted->encode(scaled, 0.f))
{
@@ -959,7 +959,7 @@ void LLSnapshotLivePreview::saveTexture()
mPreviewImage->getHeight(),
mPreviewImage->getComponents());
- scaled->biasedScaleToPowerOfTwo(512);
+ scaled->biasedScaleToPowerOfTwo(MAX_TEXTURE_SIZE);
lldebugs << "scaled texture to " << scaled->getWidth() << "x" << scaled->getHeight() << llendl;
if (formatted->encode(scaled, 0.0f))
@@ -1738,6 +1738,13 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL
lldebugs << "Loading typed res from panel " << spanel->getName() << llendl;
new_width = spanel->getTypedPreviewWidth();
new_height = spanel->getTypedPreviewHeight();
+
+ // Limit custom size for inventory snapshots to 512x512 px.
+ if (getActiveSnapshotType(view) == LLSnapshotLivePreview::SNAPSHOT_TEXTURE)
+ {
+ new_width = llmin(new_width, MAX_TEXTURE_SIZE);
+ new_height = llmin(new_height, MAX_TEXTURE_SIZE);
+ }
}
else
{