summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/integration_tests/llimage_libtest/filters/julesverne.xml (renamed from indra/newview/app_settings/filters/JulesVerne.xml)0
-rw-r--r--indra/integration_tests/llimage_libtest/filters/lensflare.xml45
-rwxr-xr-xindra/llimage/llimagefilter.cpp2
-rwxr-xr-xindra/newview/app_settings/filters/Autocontrast.xml11
-rw-r--r--indra/newview/app_settings/filters/LensFlare.xml131
-rwxr-xr-xindra/newview/app_settings/filters/Miniature.xml118
-rw-r--r--indra/newview/app_settings/filters/Overcast.xml24
-rw-r--r--indra/newview/app_settings/filters/Spotlight.xml38
-rwxr-xr-x[-rw-r--r--]indra/newview/app_settings/filters/Toycamera.xml (renamed from indra/newview/app_settings/filters/Heatwave.xml)36
-rwxr-xr-xindra/newview/app_settings/settings.xml11
-rwxr-xr-xindra/newview/llfloatersnapshot.cpp41
-rwxr-xr-xindra/newview/skins/default/xui/en/floater_snapshot.xml4
-rwxr-xr-xindra/newview/skins/default/xui/en/strings.xml13
13 files changed, 367 insertions, 107 deletions
diff --git a/indra/newview/app_settings/filters/JulesVerne.xml b/indra/integration_tests/llimage_libtest/filters/julesverne.xml
index 981e221da9..981e221da9 100644
--- a/indra/newview/app_settings/filters/JulesVerne.xml
+++ b/indra/integration_tests/llimage_libtest/filters/julesverne.xml
diff --git a/indra/integration_tests/llimage_libtest/filters/lensflare.xml b/indra/integration_tests/llimage_libtest/filters/lensflare.xml
index ec8afc8daa..0b5af9c82b 100644
--- a/indra/integration_tests/llimage_libtest/filters/lensflare.xml
+++ b/indra/integration_tests/llimage_libtest/filters/lensflare.xml
@@ -8,42 +8,35 @@
<real>1.0</real>
</array>
<array>
- <string>brighten</string>
- <real>0.1</real>
- <real>1.0</real>
- <real>1.0</real>
- <real>1.0</real>
- </array>
- <array>
<string>stencil</string>
- <string>vignette</string>
+ <string>gradient</string>
<string>add</string>
+ <real>1.0</real>
<real>0.0</real>
- <real>0.4</real>
- <real>-0.5</real>
- <real>0.5</real>
- <real>0.15</real>
- <real>20.0</real>
+ <real>-1.0</real>
+ <real>1.0</real>
+ <real>1.0</real>
+ <real>-1.0</real>
</array>
<array>
<string>colorize</string>
<real>1.0</real>
<real>1.0</real>
<real>1.0</real>
- <real>0.15</real>
- <real>0.15</real>
- <real>0.15</real>
+ <real>0.1</real>
+ <real>0.1</real>
+ <real>0.0</real>
</array>
<array>
<string>stencil</string>
<string>vignette</string>
<string>add</string>
<real>0.0</real>
- <real>0.4</real>
- <real>-0.5</real>
- <real>0.5</real>
- <real>0.20</real>
- <real>20.0</real>
+ <real>1.0</real>
+ <real>-1.0</real>
+ <real>1.0</real>
+ <real>1.5</real>
+ <real>5.0</real>
</array>
<array>
<string>colorize</string>
@@ -59,11 +52,11 @@
<string>vignette</string>
<string>add</string>
<real>0.0</real>
- <real>0.5</real>
- <real>-0.7</real>
- <real>0.7</real>
- <real>0.10</real>
- <real>20.0</real>
+ <real>1.0</real>
+ <real>-1.0</real>
+ <real>1.0</real>
+ <real>1.0</real>
+ <real>5.0</real>
</array>
<array>
<string>colorize</string>
diff --git a/indra/llimage/llimagefilter.cpp b/indra/llimage/llimagefilter.cpp
index 3d0c488768..6e9ea2f948 100755
--- a/indra/llimage/llimagefilter.cpp
+++ b/indra/llimage/llimagefilter.cpp
@@ -55,6 +55,7 @@ LLImageFilter::LLImageFilter(const std::string& file_path) :
{
// Load filter description from file
llifstream filter_xml(file_path);
+ llinfos << "Merov : load filter : " << file_path << llendl;
if (filter_xml.is_open())
{
// Load and parse the file
@@ -88,6 +89,7 @@ void LLImageFilter::executeFilter(LLPointer<LLImageRaw> raw_image)
{
mImage = raw_image;
+ llinfos << "Merov : execute filter on image size " << mImage->getWidth() << "x" << mImage->getHeight() << llendl;
//std::cout << "Filter : size = " << mFilterData.size() << std::endl;
for (S32 i = 0; i < mFilterData.size(); ++i)
{
diff --git a/indra/newview/app_settings/filters/Autocontrast.xml b/indra/newview/app_settings/filters/Autocontrast.xml
new file mode 100755
index 0000000000..ec3d7561bd
--- /dev/null
+++ b/indra/newview/app_settings/filters/Autocontrast.xml
@@ -0,0 +1,11 @@
+<llsd>
+ <array>
+ <array>
+ <string>linearize</string>
+ <real>0.01</real>
+ <real>1.0</real>
+ <real>1.0</real>
+ <real>1.0</real>
+ </array>
+ </array>
+</llsd>
diff --git a/indra/newview/app_settings/filters/LensFlare.xml b/indra/newview/app_settings/filters/LensFlare.xml
new file mode 100644
index 0000000000..0b5af9c82b
--- /dev/null
+++ b/indra/newview/app_settings/filters/LensFlare.xml
@@ -0,0 +1,131 @@
+<llsd>
+ <array>
+ <array>
+ <string>linearize</string>
+ <real>0.01</real>
+ <real>1.0</real>
+ <real>1.0</real>
+ <real>1.0</real>
+ </array>
+ <array>
+ <string>stencil</string>
+ <string>gradient</string>
+ <string>add</string>
+ <real>1.0</real>
+ <real>0.0</real>
+ <real>-1.0</real>
+ <real>1.0</real>
+ <real>1.0</real>
+ <real>-1.0</real>
+ </array>
+ <array>
+ <string>colorize</string>
+ <real>1.0</real>
+ <real>1.0</real>
+ <real>1.0</real>
+ <real>0.1</real>
+ <real>0.1</real>
+ <real>0.0</real>
+ </array>
+ <array>
+ <string>stencil</string>
+ <string>vignette</string>
+ <string>add</string>
+ <real>0.0</real>
+ <real>1.0</real>
+ <real>-1.0</real>
+ <real>1.0</real>
+ <real>1.5</real>
+ <real>5.0</real>
+ </array>
+ <array>
+ <string>colorize</string>
+ <real>1.0</real>
+ <real>1.0</real>
+ <real>1.0</real>
+ <real>0.6</real>
+ <real>0.0</real>
+ <real>0.0</real>
+ </array>
+ <array>
+ <string>stencil</string>
+ <string>vignette</string>
+ <string>add</string>
+ <real>0.0</real>
+ <real>1.0</real>
+ <real>-1.0</real>
+ <real>1.0</real>
+ <real>1.0</real>
+ <real>5.0</real>
+ </array>
+ <array>
+ <string>colorize</string>
+ <real>1.0</real>
+ <real>1.0</real>
+ <real>1.0</real>
+ <real>0.6</real>
+ <real>0.6</real>
+ <real>0.0</real>
+ </array>
+ <array>
+ <string>stencil</string>
+ <string>vignette</string>
+ <string>add</string>
+ <real>0.0</real>
+ <real>0.5</real>
+ <real>0.5</real>
+ <real>-0.5</real>
+ <real>0.10</real>
+ <real>20.0</real>
+ </array>
+ <array>
+ <string>colorize</string>
+ <real>1.0</real>
+ <real>1.0</real>
+ <real>1.0</real>
+ <real>0.7</real>
+ <real>0.0</real>
+ <real>0.0</real>
+ </array>
+ <array>
+ <string>stencil</string>
+ <string>vignette</string>
+ <string>add</string>
+ <real>0.0</real>
+ <real>0.5</real>
+ <real>0.6</real>
+ <real>-0.6</real>
+ <real>0.05</real>
+ <real>20.0</real>
+ </array>
+ <array>
+ <string>colorize</string>
+ <real>1.0</real>
+ <real>1.0</real>
+ <real>1.0</real>
+ <real>0.7</real>
+ <real>0.0</real>
+ <real>0.0</real>
+ </array>
+ <array>
+ <string>stencil</string>
+ <string>vignette</string>
+ <string>add</string>
+ <real>0.0</real>
+ <real>0.5</real>
+ <real>0.4</real>
+ <real>-0.4</real>
+ <real>0.025</real>
+ <real>20.0</real>
+ </array>
+ <array>
+ <string>colorize</string>
+ <real>1.0</real>
+ <real>1.0</real>
+ <real>1.0</real>
+ <real>0.7</real>
+ <real>0.0</real>
+ <real>0.0</real>
+ </array>
+ </array>
+</llsd>
diff --git a/indra/newview/app_settings/filters/Miniature.xml b/indra/newview/app_settings/filters/Miniature.xml
new file mode 100755
index 0000000000..9aa8a87c6f
--- /dev/null
+++ b/indra/newview/app_settings/filters/Miniature.xml
@@ -0,0 +1,118 @@
+<llsd>
+ <array>
+ <array>
+ <string>linearize</string>
+ <real>0.02</real>
+ <real>1.0</real>
+ <real>1.0</real>
+ <real>1.0</real>
+ </array>
+ <array>
+ <string>contrast</string>
+ <real>1.02</real>
+ <real>1.0</real>
+ <real>1.0</real>
+ <real>1.0</real>
+ </array>
+ <array>
+ <string>saturate</string>
+ <real>1.2</real>
+ </array>
+ <array>
+ <string>stencil</string>
+ <string>vignette</string>
+ <string>blend</string>
+ <real>0.0</real>
+ <real>0.25</real>
+ <real>0.0</real>
+ <real>0.0</real>
+ <real>0.25</real>
+ <real>2.0</real>
+ </array>
+ <array>
+ <string>sharpen</string>
+ </array>
+ <array>
+ <string>stencil</string>
+ <string>gradient</string>
+ <string>blend</string>
+ <real>1.0</real>
+ <real>0.0</real>
+ <real>0.0</real>
+ <real>-1.0</real>
+ <real>0.0</real>
+ <real>-0.25</real>
+ </array>
+ <array>
+ <string>blur</string>
+ </array>
+ <array>
+ <string>blur</string>
+ </array>
+ <array>
+ <string>blur</string>
+ </array>
+ <array>
+ <string>blur</string>
+ </array>
+ <array>
+ <string>blur</string>
+ </array>
+ <array>
+ <string>blur</string>
+ </array>
+ <array>
+ <string>blur</string>
+ </array>
+ <array>
+ <string>blur</string>
+ </array>
+ <array>
+ <string>blur</string>
+ </array>
+ <array>
+ <string>blur</string>
+ </array>
+ <array>
+ <string>stencil</string>
+ <string>gradient</string>
+ <string>blend</string>
+ <real>1.0</real>
+ <real>0.0</real>
+ <real>0.0</real>
+ <real>1.0</real>
+ <real>0.0</real>
+ <real>0.25</real>
+ </array>
+ <array>
+ <string>blur</string>
+ </array>
+ <array>
+ <string>blur</string>
+ </array>
+ <array>
+ <string>blur</string>
+ </array>
+ <array>
+ <string>blur</string>
+ </array>
+ <array>
+ <string>blur</string>
+ </array>
+ <array>
+ <string>blur</string>
+ </array>
+ <array>
+ <string>blur</string>
+ </array>
+ <array>
+ <string>blur</string>
+ </array>
+ <array>
+ <string>blur</string>
+ </array>
+ <array>
+ <string>blur</string>
+ </array>
+ </array>
+</llsd> \ No newline at end of file
diff --git a/indra/newview/app_settings/filters/Overcast.xml b/indra/newview/app_settings/filters/Overcast.xml
deleted file mode 100644
index dce5ab3e9e..0000000000
--- a/indra/newview/app_settings/filters/Overcast.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<llsd>
- <array>
- <array>
- <string>linearize</string>
- <real>0.1</real>
- <real>1.0</real>
- <real>1.0</real>
- <real>1.0</real>
- </array>
- <array>
- <string>colorize</string>
- <real>1.0</real>
- <real>1.0</real>
- <real>1.0</real>
- <real>0.0</real>
- <real>0.3</real>
- <real>0.0</real>
- </array>
- <array>
- <string>saturate</string>
- <real>0.35</real>
- </array>
- </array>
-</llsd>
diff --git a/indra/newview/app_settings/filters/Spotlight.xml b/indra/newview/app_settings/filters/Spotlight.xml
index 044b2c0b3a..0e2e0ad68c 100644
--- a/indra/newview/app_settings/filters/Spotlight.xml
+++ b/indra/newview/app_settings/filters/Spotlight.xml
@@ -2,47 +2,43 @@
<array>
<array>
<string>linearize</string>
- <real>0.1</real>
+ <real>0.0</real>
+ <real>1.0</real>
<real>1.0</real>
<real>1.0</real>
+ </array>
+ <array>
+ <string>stencil</string>
+ <string>vignette</string>
+ <string>add</string>
+ <real>0.0</real>
+ <real>0.4</real>
+ <real>0.0</real>
+ <real>0.0</real>
<real>1.0</real>
+ <real>2.0</real>
</array>
<array>
<string>contrast</string>
- <real>0.8</real>
<real>1.0</real>
<real>1.0</real>
<real>1.0</real>
- </array>
- <array>
- <string>saturate</string>
- <real>1.5</real>
+ <real>1.0</real>
</array>
<array>
<string>stencil</string>
<string>vignette</string>
- <string>fade</string>
- <real>0.75</real>
- <real>1.0</real>
+ <string>add</string>
+ <real>-0.8</real>
+ <real>0.0</real>
<real>0.0</real>
<real>0.0</real>
<real>1.0</real>
- <real>5.0</real>
- </array>
- <array>
- <string>saturate</string>
- <real>0.8</real>
+ <real>2.0</real>
</array>
<array>
<string>contrast</string>
- <real>1.1</real>
- <real>1.0</real>
- <real>1.0</real>
<real>1.0</real>
- </array>
- <array>
- <string>brighten</string>
- <real>0.1</real>
<real>1.0</real>
<real>1.0</real>
<real>1.0</real>
diff --git a/indra/newview/app_settings/filters/Heatwave.xml b/indra/newview/app_settings/filters/Toycamera.xml
index a99f41c833..4e76f6b2fb 100644..100755
--- a/indra/newview/app_settings/filters/Heatwave.xml
+++ b/indra/newview/app_settings/filters/Toycamera.xml
@@ -1,15 +1,29 @@
<llsd>
<array>
<array>
+ <string>stencil</string>
+ <string>vignette</string>
+ <string>fade</string>
+ <real>0.0</real>
+ <real>1.0</real>
+ <real>0.0</real>
+ <real>0.0</real>
+ <real>1.2</real>
+ <real>3.0</real>
+ </array>
+ <array>
<string>linearize</string>
- <real>0.1</real>
+ <real>0.05</real>
<real>1.0</real>
<real>1.0</real>
<real>1.0</real>
</array>
<array>
+ <string>grayscale</string>
+ </array>
+ <array>
<string>contrast</string>
- <real>0.8</real>
+ <real>1.1</real>
<real>1.0</real>
<real>1.0</real>
<real>1.0</real>
@@ -17,22 +31,16 @@
<array>
<string>stencil</string>
<string>vignette</string>
- <string>fade</string>
- <real>0.5</real>
+ <string>blend</string>
<real>1.0</real>
<real>0.0</real>
<real>0.0</real>
- <real>1.0</real>
- <real>4.0</real>
+ <real>0.0</real>
+ <real>0.5</real>
+ <real>2.0</real>
</array>
<array>
- <string>colorize</string>
- <real>1.0</real>
- <real>0.0</real>
- <real>1.0</real>
- <real>0.4</real>
- <real>0.0</real>
- <real>0.2</real>
+ <string>blur</string>
</array>
</array>
-</llsd>
+</llsd> \ No newline at end of file
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index afc4ac617c..43c82c3005 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -11268,6 +11268,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>SnapshotFiltersEnabled</key>
+ <map>
+ <key>Comment</key>
+ <string>Enable filters in the Snapshot Advanced panel (experimental).</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>SnapshotFormat</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index 1d52ac5a69..8e48d35c1d 100755
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -478,9 +478,6 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
previewp->setSnapshotType(shot_type);
previewp->setSnapshotFormat(shot_format);
previewp->setSnapshotBufferType(layer_type);
- // Filters
- //const std::string& filter_name = floater->getChild<LLComboBox>("filters_combobox")->getSimple();
- //previewp->setFilter(filter_name);
}
LLPanelSnapshot* current_panel = Impl::getActivePanel(floater);
@@ -575,8 +572,17 @@ void LLFloaterSnapshot::Impl::onClickFilter(LLUICtrl *ctrl, void* data)
LLFloaterSnapshot *view = (LLFloaterSnapshot *)data;
if (view)
{
- checkAutoSnapshot(getPreviewView(view));
updateControls(view);
+ LLSnapshotLivePreview* previewp = getPreviewView(view);
+ if (previewp)
+ {
+ checkAutoSnapshot(previewp);
+ // Note : index 0 of the filter drop down is assumed to be "No filter" in whichever locale
+ LLComboBox* filterbox = static_cast<LLComboBox *>(view->getChild<LLComboBox>("filters_combobox"));
+ std::string filter_name = (filterbox->getCurrentIndex() ? filterbox->getSimple() : "");
+ previewp->setFilter(filter_name);
+ previewp->updateSnapshot(FALSE, TRUE);
+ }
}
}
@@ -1078,16 +1084,25 @@ BOOL LLFloaterSnapshot::postBuild()
getChild<LLUICtrl>("auto_snapshot_check")->setValue(gSavedSettings.getBOOL("AutoSnapshot"));
childSetCommitCallback("auto_snapshot_check", Impl::onClickAutoSnap, this);
- // Update filter list
- //std::vector<std::string> filter_list = LLImageFiltersManager::getInstance()->getFiltersList();
- //LLComboBox* filterbox = getChild<LLComboBox>("filters_combobox");
- //for (U32 i = 0; i < filter_list.size(); i++)
- //{
- // filterbox->add(filter_list[i]);
- //}
- //childSetCommitCallback("filters_combobox", Impl::onClickFilter, this);
+ // Filters
+ LLComboBox* filterbox = getChild<LLComboBox>("filters_combobox");
+ if (gSavedSettings.getBOOL("SnapshotFiltersEnabled"))
+ {
+ // Update filter list if setting is on (experimental)
+ std::vector<std::string> filter_list = LLImageFiltersManager::getInstance()->getFiltersList();
+ for (U32 i = 0; i < filter_list.size(); i++)
+ {
+ filterbox->add(filter_list[i]);
+ }
+ childSetCommitCallback("filters_combobox", Impl::onClickFilter, this);
+ }
+ else
+ {
+ // Hide Filter UI if setting is off (default)
+ getChild<LLUICtrl>("filter_list_label")->setVisible(FALSE);
+ filterbox->setVisible(FALSE);
+ }
-
LLWebProfile::setImageUploadResultCallback(boost::bind(&LLFloaterSnapshot::Impl::onSnapshotUploadFinished, _1));
LLPostCard::setPostResultCallback(boost::bind(&LLFloaterSnapshot::Impl::onSendingPostcardFinished, _1));
diff --git a/indra/newview/skins/default/xui/en/floater_snapshot.xml b/indra/newview/skins/default/xui/en/floater_snapshot.xml
index 5e3c7d4e3d..771035b40d 100755
--- a/indra/newview/skins/default/xui/en/floater_snapshot.xml
+++ b/indra/newview/skins/default/xui/en/floater_snapshot.xml
@@ -381,7 +381,6 @@
top_pad="8"
width="180"
name="auto_snapshot_check" />
- <!-- If we ever want to add filters to the snapshot panel...
<text
type="string"
length="1"
@@ -389,7 +388,7 @@
height="13"
layout="topleft"
left="10"
- name="layer_type_label"
+ name="filter_list_label"
top_pad="10"
width="50">
Filter:
@@ -408,6 +407,5 @@
name="NoFilter"
value="NoFilter" />
</combo_box>
- -->
</panel>
</floater>
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 92913f678d..51576f71a8 100755
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -171,16 +171,17 @@ Please try logging in again in a minute.</string>
<!-- SLShare: User Friendly Filter Names Translation -->
<string name="BlackAndWhite">Black &amp; White</string>
<string name="Colors1970">1970&apos;s Colors</string>
- <string name="Heatwave">Heat Wave</string>
<string name="Intense">Intense</string>
- <string name="JulesVerne">Jules Verne</string>
- <string name="Newspaper">Newspaper</string>
- <string name="Overcast">Overcast</string>
+ <string name="Newspaper">Newsprint</string>
<string name="Sepia">Sepia</string>
<string name="Spotlight">Spotlight</string>
<string name="Video">Video</string>
-
- <!-- Tooltip -->
+ <string name="Autocontrast">Autocontrast</string>
+ <string name="LensFlare">Lens Flare</string>
+ <string name="Miniature">Miniature</string>
+ <string name="Toycamera">Toy Camera</string>
+
+ <!-- Tooltip -->
<string name="TooltipPerson">Person</string><!-- Object under mouse pointer is an avatar -->
<string name="TooltipNoName">(no name)</string> <!-- No name on an object -->
<string name="TooltipOwner">Owner:</string> <!-- Owner name follows -->