diff options
Diffstat (limited to 'indra/newview/llfloatersnapshot.cpp')
-rw-r--r-- | indra/newview/llfloatersnapshot.cpp | 11 |
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 { |