Get Updates By E-mail 

image processing

Manipulating UIImage Data Directly Within A C type Array

  •  
  •  
  •  
  •  
  •  

Manipulation of image data is done within many highly successful apps on the iPhone.  What is great about these apps is that the actual algorithms are relatively simple, and by mixing a few things together you can create some interesting effects.

There is one catch, and that is in order to directly manipulate the data from a UIImage you have to jump through a few Core Graphics hoops.   In creating a photo app it took me awhile to find the actual code to let me do that seemingly simple task.

Fortunately, Brandon Trebitowski has posted a nice code snippet on his site which copies that image data directly into an array which you can then modify easily, and he has placed a tutorial along with a project showing the code in action on his website here:
Image Manipulation: Retrieving And Updating Pixel Values For A UIImage

If you’d like to learn more about image processing in general you can head over and take a look at the Image Processing Lab over at CodeProject.  While that particular tutorial uses C# you can see the algorithms for some common image filters and do some interesting things.


  •  
  •  
  •  
  •  
  •