From 47a493df60d066b79ca6c37c746fe153bc3b1fad Mon Sep 17 00:00:00 2001 From: NiranV Date: Tue, 29 Jul 2014 18:44:39 +0200 Subject: 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. --- indra/newview/llsnapshotlivepreview.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'indra') 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; -- cgit v1.2.3