title: How to NSLog pixel RGB from a UIImage?
body: <p>I just want to:<br></p>
  
  <p><strong>1)</strong> Copy the pixel data.<br>
  <strong>2)</strong> Iterate and Modify each pixel (just show me how to NSLog the ARGB values as 255)<br>
  <strong>3)</strong> Create a UIImage from the new pixel data<br></p>
  
  <p>I can figure out the the gory details if someone can just tell me how to NSLog the RGBA values of a pixel as 255. How do I modify the following code to do this? Be Specific Please!</p>
  
  <pre><code>-(UIImage*)modifyPixels:(UIImage*)originalImage
  {
  
  NSData* pixelData = (NSData*)CGDataProviderCopyData(CGImageGetDataProvider(originalImage.CGImage));
  uint myLength = [pixelData length];
  
      for(int i = 0; i &lt; myLength; i += 4) {
  
  
          //CHANGE PIXELS HERE
          /*
          Sidenote: Just show me how to NSLog them
          */
          //Example:
          //NSLog(@"Alpha 255-Value is: %u", data[i]);
          //NSLog(@"Red 255-Value is: %u", data[i+1]);
          //NSLog(@"Green 255-Value is: %u", data[i+2]);
          //NSLog(@"Blue 255-Value is: %u", data[i+3]);
      }
  
      //CREATE NEW UIIMAGE (newImage) HERE 
  
      return newImage;    
  }
  </code></pre>