C# Graphics error when creating a rectangle on top of a tif
<p>What I have is a .tif file being loaded into a picture box.  When I try to draw a rectangle on top of that tif it throws the following error:  </p>

<p>A Graphics object cannot be created from an image that has an indexed pixel format.  </p>

<p>here is the code i'm using, it throws the error at using (Graphics g = Graphics.FromImage(img)).  img is the file being loaded into the picture box.</p>

<pre><code>                           using (Graphics g = Graphics.FromImage(img))                            
                        {
                            int x1value = Convert.ToInt32(x1);
                            int y1value = Convert.ToInt32(y1);
                            int x3value = Convert.ToInt32(x3);
                            int y3value = Convert.ToInt32(y3);
                            SolidBrush blackBrush = new SolidBrush(Color.Black);
                            g.FillRectangle(blackBrush, x1value, y1value, x3value, y3value);  
</code></pre>
