1

I am looking for a way to pixelize a UIImage in Cocoa touch. I don't know what the best approach would be (some people have suggested me using OpenGL) but I have a feeling there must exist some other simple way I may be overlooking. Does anyone know of one?

DamnedBird
  • 11
  • 1
  • 3
  • possible duplicate of [How do I perform a fast pixellation filter on an image?](http://stackoverflow.com/questions/5049041/how-do-i-perform-a-fast-pixellation-filter-on-an-image) – Brad Larson Mar 06 '12 at 18:36

1 Answers1

4

Signal processing explanation of what to do to the image:

  1. Downsample by N
  2. Upsample by N
  3. Then convolve the image with a NxN box filter (Matlab code to create NxN box filterrect = ones(N,N)).

Comp sci explanation:

  1. create an empty new image that is the same size
  2. iterate over every Nth pixel in the original image
  3. repeat every Nth pixel in the new image
Trevor Boyd Smith
  • 18,164
  • 32
  • 127
  • 177