title: NSImage loading a portion of image
body: <p>The requirement is like this, 
  I would get a single large PNG Images for a button, this single image will contain images for hOver, button clicked , mouse exit that need to be displayed, 
  Single PNG File size would be 1024 X 28, so each image have size about 256 X 28, 
  I am googling the best possible approach but couldn't make out how to achieve this, </p>
  
  <p>I have following approach in mind, </p>
  
  <pre class="lang-m prettyprint-override"><code>NSImage *pBtnImage[MAX_BUTTON_IMAGES]
  for ( i = 0; i &lt; 4 ; i++) {
  pBtnImage[i] = [[NSImage alloc]initWithData:??????]; 
  } 
  </code></pre>
  
  <p>I want to know what should i give in the NSData parameter, </p>
  
  <p>Is it possible to load a Single Image and clipped image accordingly as and when it needed. </p>
  
  <p>Thanks in advance </p>