how can a pixel in a bitmap can be deleted?
<p>i m decreasing the resolution of a bitmap. i found a method on a site which is as follows</p>

<p>Average the values of all surrounding pixels, store that value in the choosen pixel location, then delete all the surrounding pixels.so a 4*6 matrix becomes a 4 x 3 matrix.</p>

<p>i am accessing pixels by this code</p>

<pre><code>for(int y = 0; y &lt; bmp.bmHeight; y++)   
  {      
      for(int x = 0; x &lt; bmp.bmWidth; x++)     
      {         
          COLORREF rgb = dc.GetPixel(x, y);     
          BYTE r = GetRValue(rgb);       
          BYTE g = GetGValue(rgb);     
          BYTE b = GetBValue(rgb);            
          dc.SetPixel(x, y, RGB(r,g,b));      
      }   
  } 
</code></pre>

<p>tell me how can i delete a pixel?   </p>
