cocos2d utility function to create image sprite