Use CCImage::initWithImageData instead of direct saving