title: Converting pygame surface buffer bytes into numpy array
body: <p>Anybody know why this array I created from pygame's <code>get_buffer</code> method has the R, G, B, values reversed?  I want to create an array with the colour values in the same order I put them in - like <code>[8, 16, 32, 0]</code>.  Have I done something wrong or is this something with the way pygame stores pixel data?</p>
  
  <pre><code>&gt;&gt;&gt; import pygame
  &gt;&gt;&gt; import pygame.gfxdraw
  &gt;&gt;&gt; import numpy as np
  &gt;&gt;&gt; background_colour = (1, 1, 1)
  &gt;&gt;&gt; width, height = (256, 256)
  &gt;&gt;&gt; screen = pygame.Surface((width, height))
  &gt;&gt;&gt; pygame.draw.rect(screen, (8, 16, 32), (0, 0, 100, 100), 0)
  &lt;rect(0, 0, 100, 100)&gt;
  &gt;&gt;&gt; s = screen.get_buffer()
  &gt;&gt;&gt; x = np.fromstring(s.raw, dtype='b').reshape(height, width, 4)
  &gt;&gt;&gt; x[0, 0]
  array([32, 16,  8,  0], dtype=int8)
  </code></pre>
  
  <p>I tried this but I loose the R value:</p>
  
  <pre><code>&gt;&gt;&gt; y = x[:, :, 3:0:-1]
  &gt;&gt;&gt; y[0, 0]
  array([ 0,  8, 16], dtype=int8)
  </code></pre>
  
  <p>(I'm using numpy version 1.8.2 so I don't have <code>np.flip</code>).</p>