title: How to program an image filter using Color lookup table in Nokia Imaging SDK
body: <p>I have a few Color lookup tables that looks like <a href="http://imgur.com/oWkletn" rel="nofollow">this</a>. Is there a guide that i can use to program an image filter using color lookup table in Nokia Imaging SDK. I am switching to Nokia Imaging SDK because i have been told that it is more optimized and accurate.</p>
  
  <p>currently the code looks like this.</p>
  
  <pre><code>public WriteableBitmap Process()
      {
          int width = inputimage.PixelWidth;
          int height = inputimage.PixelHeight;
  
          int[] pixelArray = this.inputimage.Pixels;
  
          for (int i = 0; i &lt; width; i++)
          {           
  
              for (int j = 0; j &lt; height; j++)
              {
                  // Extract color components
                  var c = inputimage.GetPixel(i,j);
                  var b = c.B;
                  var g = c.G;
                  var r = c.R;
                  var a = c.A;
  
                  int blockBlue = b / 4;
                  int blockGreen = g / 4;
                  int blockRed = r / 4;
  
                  int right = blockBlue % 8;
                  int down = blockBlue / 8;
  
                  int px = right * 64 + blockRed;
                  int py = down * 64 + blockGreen;
  
  
                  Color clr = LookUpTable.GetPixel(px, py);
  
                  // Set result color
                  inputimage.SetPixel(i, j, clr);                    
              }
          }
  
          return wBmp;
      }
  </code></pre>