CCFileUtils and CCImage

CCFileUtils and CCImage
0.0 0


is it actually possible to use CCFileUtils to read the data from an image outside of resource folder and use the data to create a CCImage using initWithData?


ok… does not seem to work

full path: C:\Users\Edmund\Pictures\picture001.jpg
The thread 0x1724 has exited with code 0 (0x0).
CCFileUtils_win8_metro.cpp: Get data from file failed!


can be,try again


since its for win8, perhaps i need to set some permission for file access somewhere?


Seem like some permission issue which i’m at a lost.

Using CCFileUtils::fullPathFromRelativePath("HelloWorld.png"); gave me the full path of "C:\\Projects\\helloworld-cocos2dx\\Debug\\helloworld-cocos2dx\\AppX\\Assets\\HelloWorld.png".

Using the given path with CCFileUtils::isFileExist(fpath) will return true, this is because HelloWorld.png resides in the projects’ assets folder. When trying to access a file residing outside, such as "C:\\Users\\Edmund\\Pictures\\picture002.jpg" would return false.