title: NSImage doesn't scale
body: <p>I'm developing a quick app in which I have a method that should rescale a @2x image to a regular one. The problem is that it doesn't :(</p>
  
  <p>Why?</p>
  
  <pre><code>-(BOOL)createNormalImage:(NSString*)inputRetinaImagePath {
  
      NSImage *inputRetinaImage = [[NSImage alloc] initWithContentsOfFile:inputRetinaImagePath];
  
  
  
      NSSize size = NSZeroSize;
      size.width = inputRetinaImage.size.width*0.5;
      size.height = inputRetinaImage.size.height*0.5;
  
      [inputRetinaImage setSize:size];
  
  
      NSLog(@"%f",inputRetinaImage.size.height);
  
  
      NSBitmapImageRep *imgRep = [[inputRetinaImage representations] objectAtIndex: 0];
  
      NSData *data = [imgRep representationUsingType: NSPNGFileType properties: nil];
  
      NSString *outputFilePath = [[inputRetinaImagePath substringToIndex:inputRetinaImagePath.length - 7] stringByAppendingString:@".png"];
  
      NSLog([@"Normal version file path: " stringByAppendingString:outputFilePath]);
      [data writeToFile:outputFilePath atomically: NO];
      return true;
  }
  </code></pre>