1

I'm fairly new to Ios programming and was hoping someone can help me here or point me in the right direction.

How I would I create a new image from part of an existing one?

For example, if I have an UIImage in a UIImageView, that is 100 pixels(or points) square, and I want to create a new UIImage from a section of the original.

This new UIImage might be 10 pixels square and start at the origin of the original UIImage ( it could be anywhere really ). I might then take this new image and display it in another view or add it to an array etc.

Or another way to explain might be if I had an image of one face of a Rubix cube... and I then wanted to create new images for each of the different coloured squares...

Any help or ideas will be much appreciated.

PeeHaa
  • 71,436
  • 58
  • 190
  • 262
Len Len
  • 11
  • 1
  • Use CGImageCreateWithImageInRect - here's an example: http://stackoverflow.com/questions/3150364/how-use-cgimagecreatewithimageinrect-for-iphone-4-hd – SVD Sep 25 '11 at 16:56

0 Answers0