title: Poor image resolution when using imageList in C#
body: <p>I am using an imageList which has 5 images stored, 3 of which are .jpg and 2 .bmp.</p>
  
  <p>I am using these images to change a picturebox image using a timer - </p>
  
  <pre><code>private void timer1_Tick(object sender, EventArgs e)
      {
          pictureBox1.Image = imageList1.Images[imgIndex++];
      }
  </code></pre>
  
  <p>where <code>private int imgIndex = 0;</code> is set in the <code>Form</code> class.</p>
  
  <p>I have 2 problems, firstly the resolution of the images when displayed in the picture box is very pixelated and of poor quality, and I have tried to resolve this by changing the <code>ColorDepth</code> in the <code>imageList</code> properties and I have also tried using different image formats i.e. <code>.gif</code>, <code>.png</code> etc and altering the image size but this does not work. How can I get a better resolution?</p>
  
  <p>The second problem is when the timer gets to the last image, the application crashes with the error 'InvalidArgument=Value of '5' is not valid for 'index. Parameter name: index'
  There are 5 images in the imageList and when debugging the error arises from <code>private int imgIndex = 0;</code> how can I resolve this?</p>