summaryrefslogtreecommitdiff
path: root/indra/llimage
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2014-02-06 11:57:01 -0800
committerMerov Linden <merov@lindenlab.com>2014-02-06 11:57:01 -0800
commit2ba7552b9cd94b62c850365bcc537f0b3e344917 (patch)
tree744b2a12db06d60866a584a849a78e5f99b17366 /indra/llimage
parent9112a47f9be023dd83bf4de72d490d21d85e6b5e (diff)
ACME-1301 : Add colortransform as a secondary filter command
Diffstat (limited to 'indra/llimage')
-rwxr-xr-xindra/llimage/llimagefilter.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/llimage/llimagefilter.cpp b/indra/llimage/llimagefilter.cpp
index 9093e4b59c..8f7e340d16 100755
--- a/indra/llimage/llimagefilter.cpp
+++ b/indra/llimage/llimagefilter.cpp
@@ -256,6 +256,16 @@ void LLImageFilter::executeFilter(LLPointer<LLImageRaw> raw_image)
kernel.mMatrix[k][j] = mFilterData[i][index++].asReal();
convolve(kernel,normalize,abs_value);
}
+ else if (filter_name == "colortransform")
+ {
+ LLMatrix3 transform;
+ S32 index = 1;
+ for (S32 k = 0; k < NUM_VALUES_IN_MAT3; k++)
+ for (S32 j = 0; j < NUM_VALUES_IN_MAT3; j++)
+ transform.mMatrix[k][j] = mFilterData[i][index++].asReal();
+ transform.transpose();
+ colorTransform(transform);
+ }
else
{
llwarns << "Filter unknown, cannot execute filter command : " << filter_name << llendl;