I’m not sure when you’d want to do this (maybe when moving from a low quality preview -> high quality image), but anyway the Cocos2D texture cache doesn’t let you use one image with two different texture formats.
[CCTexture2D setDefaultAlphaPixelFormat:kCCTexture2DPixelFormat_A8];
CCSprite* a = [CCSprite spriteWithFile@"image.png"];
[CCTexture2D setDefaultAlphaPixelFormat:kCCTexture2DPixelFormat_Default];
CCSprite* b = [CCSprite spriteWithFile@"image.png"]; // uses A8 not default
Is there a way around this?
No, the texture cache regards textures using the same file name as identical.
There’s only two ways to make this work:
If you’re worried about app size for download, you could also copy image files from the main bundle to the documents directory and change the file names when the app starts for the first time.