cocos2d/cocos2d-iphone — pull request #749 by NickyWeber (2014-05-12 10:05:51+00:00)
Title: Feature/3.1/CCRenderTexture with a more flexible save to file.

Saving images to documents folder only might just be a bit too restricted for MacOS development.
To remove some low level and almost redundant code in SpriteBuilder to save previews I added the two methods to CCRenderTexture. These allow saving images to arbitrary paths.
```
-(BOOL)saveToFilePath:(NSString*)filePath;
-(BOOL)saveToFilePath:(NSString*)filePath format:(CCRenderTextureImageFormat)format;
```
Added code to prevent a crash on MacOS if the URL provided in -saveToFile is invalid after converting it to a documents folder path. This happens if you provide a full path in the first place.

Core logic of method moved to ```saveToFilePath:format```.