below is the test code:
NSString* imgurl = @"http://hiphotos.baidu.com/xtwfnfhv00bd/pic/item/a9da6dc911a9890af21fe7b8.jpg";
NSData* imageData = [NSData dataWithContentsOfURL: [NSURL URLWithString: imgurl]];
cocos2d::CCImage image;
image.initWithImageData((void*)[imageData bytes],imageData.length,(cocos2d::CCImage::EImageFormat)0/*kFmtJpg*/);
cocos2d::CCTexture2D* texture = new cocos2d::CCTexture2D();
texture->initWithImage(ℑ);
cocos2d::CCScene *aScene = cocos2d::CCDirector::sharedDirector()->getRunningScene();
cocos2d::CCLayer *aLayer = new cocos2d::CCLayer();
aScene->addChild(aLayer);
cocos2d::CCSprite * aSprite = cocos2d::CCSprite::spriteWithTexture(texture);
aLayer->addChild(aSprite);
aSprite->setPosition(cocos2d::CCPoint(100,100));