开发者

Use a section of a UIImage to create a new UIImage

开发者 https://www.devze.com 2023-04-08 02:12 出处:网络
I\'m fairly new to Ios programming and was hoping someone can help me here or point me in the right direction.

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 existin开发者_开发知识库g 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消