0

I am making a game in which I would like users to be able to customize their characters. I do not want to have a set of different textures for each color, because as the customization gets more complex there might be thousands of combinations.

My goal is to programmatically set the color of a array of pixels in an image and save it for later use within the game.

There seems to be very little documentation on editing images programmatically beyond applying simple effects and cropping, so any help is appreciated.

Edit One:

This app is still conceptual. I posted this question to get an idea of how to achieve the goal detailed above. I will probably be using openGL ES for this app.

67cherries
  • 6,931
  • 7
  • 35
  • 51
  • You need to be more clear about how you're doing your drawing. Are you using OpenGL? Core Graphics? SpriteKit? Something else? Without more specific information, nobody can help you. – user1118321 Feb 07 '14 at 02:21
  • @user1118321 I really don't think it matters how I am displaying an image when I only need to edit it and overwrite it. – 67cherries Feb 07 '14 at 02:25
  • It absolutely matters. There are very different techniques for editing the images and overwriting them. In OpenGL you'd use a shader. In CoreGraphics, you can use CoreImage filters. SpriteKit would probably be something else. We can't tell you what to do unless we know what you've already got. – user1118321 Feb 07 '14 at 02:28
  • Is your texture in an array? Why can't you just make a copy of your array and then change the value of each pixel? – TheAmateurProgrammer Feb 07 '14 at 02:32
  • @user1118321: I've edited my post about how I am displaying the image – 67cherries Feb 07 '14 at 02:51
  • @TheAmateurProgrammer: No, my texture is not in an array, I used that term to indicate that a had...a set of pixels to change. – 67cherries Feb 07 '14 at 02:56
  • 1
    [Here's a shader](http://stackoverflow.com/questions/9234724/how-to-change-hue-of-a-texture-with-glsl/9234854#9234854) that will allow you to change the hue of a texture in OpenGL. – user1118321 Feb 07 '14 at 03:50
  • How are you storing the texture then? – TheAmateurProgrammer Feb 07 '14 at 05:49

0 Answers0