diff options
author | NiranV <NiranV.Dean@googlemail.com> | 2014-07-29 18:44:39 +0200 |
---|---|---|
committer | NiranV <NiranV.Dean@googlemail.com> | 2014-07-29 18:44:39 +0200 |
commit | 47a493df60d066b79ca6c37c746fe153bc3b1fad (patch) | |
tree | b93cb86e61b5b689dabbff683da86308bdde5019 /indra | |
parent | e4c1929ae6fe40b04e78b821d21809f19f455d26 (diff) |
BUG-6839: Fixed:Snapshot filters do not work when saving snapshot to inventory.
I think filters actually weren't intended to be used for inventory snapshots...but anyway, now we do have filters for inventory snaps.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llsnapshotlivepreview.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index f61db77169..ce51e4214a 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -975,6 +975,21 @@ void LLSnapshotLivePreview::saveTexture() mPreviewImage->getHeight(), mPreviewImage->getComponents()); + // Apply the filter to mPreviewImage + if (getFilter() != "") + { + std::string filter_path = LLImageFiltersManager::getInstance()->getFilterPath(getFilter()); + if (filter_path != "") + { + LLImageFilter filter(filter_path); + filter.executeFilter(scaled); + } + else + { + llwarns << "Couldn't find a path to the following filter : " << getFilter() << llendl; + } + } + scaled->biasedScaleToPowerOfTwo(MAX_TEXTURE_SIZE); LL_DEBUGS() << "scaled texture to " << scaled->getWidth() << "x" << scaled->getHeight() << LL_ENDL; |