Another way to palette swap involves sentinel colors and the ability to modify a texture pixel by pixel. This method can help reclaim some extra space on the disk and in memory but it tends to take a lot of CPU time. It is also messier than the previous technique when used with anti-aliased or blended textures.
Please refer to the
project RecipeCollection01 for full working code of this recipe. Also note the included library
CCTexture2DMutable that is not included in the book itself.
For this recipe you will need an image manipulation program. Once again I recommend the free and easy to use ...