title: Combining GIF images and colormaps to 3-D image arrays
body: <p>When I read a color JPEG image:</p>
  
  <pre><code>jpgim = imread('path/to/image.jpg')
  </code></pre>
  
  <p>I get an MxNx3 array. However, with GIF files I also <a href="https://stackoverflow.com/questions/9295108/why-doesnt-my-image-load-properly-in-matlab">need to read the colormap</a>:</p>
  
  <pre><code>[gifim, map] = imread('path/to/image2.gif')
  </code></pre>
  
  <p>Let's assume that I need only the first frame if the GIF image is animated: <code>gifim = gifim(:,:,:,1)</code> Is there a way to get a standard MxNx3 image array using <code>gifim</code> and <code>map</code> as that is what later parts of my processing pipeline expect?</p>