summaryrefslogtreecommitdiff
path: root/indra/integration_tests
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2014-01-06 14:46:52 -0800
committerMerov Linden <merov@lindenlab.com>2014-01-06 14:46:52 -0800
commit3cbd0dfd849a94a789ae70f4bdc176f85cf2ba34 (patch)
tree59d12dfc5c84addc424312cabe5741ef7cd7b025 /indra/integration_tests
parent90cbda6db0d075dccc2369a68b02919b40f53cca (diff)
ACME-1236 : WIP : Make each color correct filter use a per channel alpha argument, tweak Instagram-like test filters for discussion
Diffstat (limited to 'indra/integration_tests')
-rwxr-xr-xindra/integration_tests/llimage_libtest/llimage_libtest.cpp66
1 files changed, 39 insertions, 27 deletions
diff --git a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp
index 58d7f53dd1..6045ed321d 100755
--- a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp
+++ b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp
@@ -687,73 +687,85 @@ int main(int argc, char** argv)
}
else if (filter_name == "gamma")
{
- raw_image->filterGamma((float)(filter_param));
+ raw_image->filterGamma((float)(filter_param),LLColor3::white);
}
else if (filter_name == "colorize")
{
- // For testing, we just colorize in red, modulate by the alpha passed as a parameter
- LLColor4U color = LLColor4U::red;
- color.setAlpha((U8)(filter_param * 255.0));
- raw_image->filterColorize(color);
+ // For testing, we just colorize in the red channel, modulate by the alpha passed as a parameter
+ LLColor3 color(1.0,0.0,0.0);
+ LLColor3 alpha((F32)(filter_param),0.0,0.0);
+ raw_image->filterColorize(color,alpha);
}
else if (filter_name == "contrast")
{
- raw_image->filterContrast((float)(filter_param));
+ raw_image->filterContrast((float)(filter_param),LLColor3::white);
}
else if (filter_name == "brighten")
{
- raw_image->filterBrightness((S32)(filter_param));
+ raw_image->filterBrightness((S32)(filter_param),LLColor3::white);
}
else if (filter_name == "darken")
{
- raw_image->filterBrightness((S32)(-filter_param));
+ raw_image->filterBrightness((S32)(-filter_param),LLColor3::white);
}
else if (filter_name == "linearize")
{
- raw_image->filterLinearize((float)(filter_param));
+ raw_image->filterLinearize((float)(filter_param),LLColor3::white);
}
else if (filter_name == "posterize")
{
- raw_image->filterEqualize((S32)(filter_param));
+ raw_image->filterEqualize((S32)(filter_param),LLColor3::white);
}
// Test for some "a la Instagram" filters
else if (filter_name == "Lomofi")
{
raw_image->setVignette(VIGNETTE_MODE_BLEND,4.0,0.0);
- raw_image->filterLinearize(0.2);
+ raw_image->filterLinearize(0.2,LLColor3::white);
+ raw_image->filterBrightness(20,LLColor3::white);
+ }
+ else if (filter_name == "Poprocket")
+ {
+ LLColor3 color(1.0,0.0,0.0);
+ LLColor3 alpha(0.5,0.0,0.0);
+ raw_image->filterLinearize(0.0,LLColor3::white);
+ raw_image->filterContrast(0.5,LLColor3::white);
+ raw_image->setVignette(VIGNETTE_MODE_FADE,4.0,0.5);
+ raw_image->filterColorize(color,alpha);
}
else if (filter_name == "Sutro")
{
- raw_image->filterLinearize(0.2);
+ raw_image->filterLinearize(0.2,LLColor3::white);
raw_image->setVignette(VIGNETTE_MODE_FADE,4.0,0.5);
raw_image->filterSepia();
}
+ else if (filter_name == "Toaster")
+ {
+ raw_image->filterContrast(0.8,LLColor3::white);
+ raw_image->setVignette(VIGNETTE_MODE_FADE,4.0,0.5);
+ raw_image->filterBrightness(10,LLColor3::white);
+ //raw_image->filterColorBalance(0.5,1.0,1.0);
+ }
else if (filter_name == "Inkwell")
{
- raw_image->filterLinearize(0.0);
+ raw_image->filterLinearize(0.0,LLColor3::white);
raw_image->filterGrayScale();
}
- else if (filter_name == "Poprocket")
+ else if (filter_name == "Hefe")
{
- LLColor4U color = LLColor4U::red;
- color.setAlpha((U8)(0.2 * 255.0));
- raw_image->filterLinearize(0.0);
+ raw_image->filterLinearize(0.0,LLColor3::white);
raw_image->setVignette(VIGNETTE_MODE_FADE,4.0,0.5);
- raw_image->filterColorize(color);
+ raw_image->filterContrast(1.5,LLColor3::white);
}
else if (filter_name == "Gotham")
{
- raw_image->filterLinearize(0.0);
- raw_image->filterColorBalance(1.0,1.0,20.0);
+ raw_image->filterLinearize(0.0,LLColor3::white);
+ // Blow out the Blue
+ LLColor3 color(0.0,0.0,0.0);
+ LLColor3 alpha(0.0,0.0,1.0);
+ raw_image->filterColorize(color,alpha);
+ // Convert to Grayscale
raw_image->filterGrayScale();
}
- else if (filter_name == "Toaster")
- {
- raw_image->filterContrast(0.8);
- raw_image->setVignette(VIGNETTE_MODE_FADE,4.0,0.5);
- raw_image->filterBrightness(10);
- raw_image->filterColorBalance(0.5,1.0,1.0);
- }
// Save file
if (out_file != out_end)