title: How many bits per component do I have to specify for pngcrunch-optimized 24bit PNG files with alphatransparency?
body: <p>CGBitmapContextCreate takes an parameter that's not very obvious to me:</p>
  
  <blockquote>
    <p>For example, for a 32-bit pixel format
    and an RGB color space, you would
    specify a value of 8 bits per
    component.</p>
  </blockquote>
  
  <p>I have created 24-bit PNG files with alphatransparency, and added them to Xcode. At compile time, Xcode optimizes those PNG tiles with pngcrunch.</p>
  
  <p>So, when trying to make an graphics context out of such an image file on iPhone-OS, I need to specify the bits per component. </p>
  
  <p>In this case, I would say they're 4 bits per component, although I dont know if alpha counts as an component.</p>