title: Given the pitch of an image, how to calculate the GL_UNPACK_ALIGNMENT?
body: <p>Most image library give an image as width, height, pitch and then an array pixels. OpenGL however does not take a pitch directly, instead it expects:</p>
  
  <pre><code> glPixelStorei(GL_UNPACK_ALIGNMENT, align);
   glPixelStorei(GL_UNPACK_ROW_LENGTH, row_length);
  </code></pre>
  
  <p><code>row_length</code> is <code>pitch / bytes_per_pixel</code>, but how does one calculate the proper value for <code>align</code>?</p>