summaryrefslogtreecommitdiff
path: root/indra/integration_tests
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2014-01-08 15:41:42 -0800
committerMerov Linden <merov@lindenlab.com>2014-01-08 15:41:42 -0800
commit3161d822ab1336a347f1bb34574b5c4b8e747799 (patch)
tree5772b1577aa4589ef1ed8619b9fa8061d7f8f206 /indra/integration_tests
parentc2a974f1556906f6ca69afb5942378c8dbf85169 (diff)
ACME-1236 : WIP : Added mode and angle parameter to filterScreen (renamed for consistency)
Diffstat (limited to 'indra/integration_tests')
-rwxr-xr-xindra/integration_tests/llimage_libtest/llimage_libtest.cpp34
1 files changed, 30 insertions, 4 deletions
diff --git a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp
index 69cea33911..90a7c09442 100755
--- a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp
+++ b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp
@@ -98,7 +98,11 @@ static const char USAGE[] = "\n"
" - 'darken' substracts <param> light to the image (<param> between 0 and 255).\n"
" - 'linearize' optimizes the contrast using the brightness histogram. <param> is the fraction (between 0.0 and 1.0) of discarded tail of the histogram.\n"
" - 'posterize' redistributes the colors between <param> classes per channel (<param> between 2 and 255).\n"
-" - Any other value will be interpreted as a file name describing a sequence of filters and parameters to be applied to the input images\n"
+" - 'newsscreen' applies a 2D sine screening to the red channel and output to black and white.\n"
+" - 'horizontalscreen' applies a horizontal screening to the red channel and output to black and white.\n"
+" - 'verticalscreen' applies a vertical screening to the red channel and output to black and white.\n"
+" - 'slantedscreen' applies a 45 degrees slanted screening to the red channel and output to black and white.\n"
+" - Any other value will be interpreted as a file name describing a sequence of filters and parameters to be applied to the input images.\n"
" -v, --vignette <name> [<feather> <min>]\n"
" Apply a circular central vignette <name> to the filter using the optional <feather> and <min> values. Admissible names:\n"
" - 'blend' : the filter is applied with full intensity in the center and blends with the image to the periphery.\n"
@@ -214,7 +218,17 @@ void execute_filter(const LLSD& filter_data, LLPointer<LLImageRaw> raw_image)
}
else if (filter_name == "screen")
{
- raw_image->screenFilter((S32)(filter_data[i][1].asReal()));
+ std::string screen_name = filter_data[i][1].asString();
+ EScreenMode mode = SCREEN_MODE_2DSINE;
+ if (screen_name == "2Dsine")
+ {
+ mode = SCREEN_MODE_2DSINE;
+ }
+ else if (screen_name == "line")
+ {
+ mode = SCREEN_MODE_LINE;
+ }
+ raw_image->filterScreen(mode,(S32)(filter_data[i][2].asReal()),(F32)(filter_data[i][3].asReal()));
}
}
}
@@ -821,9 +835,21 @@ int main(int argc, char** argv)
{
raw_image->filterEqualize((S32)(filter_param),LLColor3::white);
}
- else if (filter_name == "screen")
+ else if (filter_name == "newsscreen")
+ {
+ raw_image->filterScreen(SCREEN_MODE_2DSINE,(S32)(filter_param),0.0);
+ }
+ else if (filter_name == "horizontalscreen")
+ {
+ raw_image->filterScreen(SCREEN_MODE_LINE,(S32)(filter_param),0.0);
+ }
+ else if (filter_name == "verticalscreen")
+ {
+ raw_image->filterScreen(SCREEN_MODE_LINE,(S32)(filter_param),90.0);
+ }
+ else if (filter_name == "slantedscreen")
{
- raw_image->screenFilter((S32)(filter_param));
+ raw_image->filterScreen(SCREEN_MODE_LINE,(S32)(filter_param),45.0);
}
else if (filter_name != "")
{