将Sprite转换为Image。

////获取精灵的CCImageImage* HelloWorld::createImageFromSprite(Sprite* sp){	Sprite* pNewSpr = Sprite::createWithSpriteFrame(sp->getSpriteFrame());	pNewSpr->setAnchorPoint(Vec2::ZERO);	RenderTexture* pRender = RenderTexture::create(pNewSpr->getContentSize().width, pNewSpr->getContentSize().height, Texture2D::PixelFormat::RGBA8888);	pRender->begin();	pNewSpr->visit();	pRender->end();	return pRender->newImage();}//