title: kCGColorSpaceGenericRGB is deprecated on iPhone?
body: <p>I'm trying to get bitmap context with the following code:</p>
  
  <pre><code>GContextRef MyCreateBitmapContext (int pixelsWide, int pixelsHigh)
  {
      CGContextRef    context = NULL;
      CGColorSpaceRef colorSpace;
      void *          bitmapData;
      int             bitmapByteCount;
      int             bitmapBytesPerRow;
  
      bitmapBytesPerRow   = (pixelsWide * 4);                          // 1
      bitmapByteCount     = (bitmapBytesPerRow * pixelsHigh);
  
      colorSpace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB);// 2
      bitmapData = malloc( bitmapByteCount );                          // 3
      if (bitmapData == NULL)
      {
          fprintf (stderr, "Memory not allocated!");
          return NULL;
      }
  
      context = CGBitmapContextCreate (bitmapData,                     // 4
                                      pixelsWide,
                                      pixelsHigh,
                                      8,      // bits per component
                                      bitmapBytesPerRow,
                                      colorSpace,
                                      kCGImageAlphaPremultipliedLast);
      if (context== NULL)
      {
          free (bitmapData);                                          // 5
          fprintf (stderr, "Context not created!");
          return NULL;
      }
  
      CGColorSpaceRelease( colorSpace );                              // 6
      return context;                                                 // 7
  }
  </code></pre>
  
  <p>A warning says:<code>'kCGColorSpaceGenericRGB' is deprecated.</code></p>
  
  <p>Does this mean that <code>colorSpace</code> is unchangeable?  If that is true, we'll be unable to change the color data of any images using <code>colorSpace</code>. And how to process image then?</p>