title: Comparing true color pixels in C
body: <p>this is my first question here; hope I'll be clear enough...</p>
  
  <p>I've got this struct available</p>
  
  <pre><code>typedef struct COLORTRIPLE
  {
    byte blue;
    byte green;
    byte red;
  }
  </code></pre>
  
  <p>which is contained in another struct like that:</p>
  
  <pre><code>struct color_temp
  { 
    COLORTRIPLE color;
    int temp;
  };
  </code></pre>
  
  <p>And (EDIT)</p>
  
  <pre><code>#define PIXEL(image, row, column)  \
      image.pixel [(row) * image.width + (column)]
  </code></pre>
  
  <p>is a macro.</p>
  
  <p>So there will be <code>PIXEL(bmpin,row,column).red, PIXEL(bmpin,row,column).green and PIXEL(bmpin,row,column).blue</code>.</p>
  
  <p>I need to scan a bitmap file pixel by pixel and check if the current pixel is equal to one color of the color_temp struct.</p>
  
  <p>I tried something like:</p>
  
  <pre><code>if ((PIXEL(bmpin,row,column))==(map[n].color))
  {...}
  </code></pre>
  
  <p>where</p>
  
  <pre><code>struct color_temp map[]
  </code></pre>
  
  <p>is a vector of color_temp.</p>
  
  <p>But cygwin gcc says:</p>
  
  <pre><code>error:request for member 'color' in something not a struct or a union
  </code></pre>
  
  <p>Any suggestions?</p>
  
  <p>Thanks</p>
  
  <p>Mark</p>