Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.
I'm developing an application that will take a photo (or grab one from the photo library) and then slash it into 9 separate, rectangular pieces. Can anyone perhaps provide some insight into what functions I should be using? Any help would be most appreciated!
...very roughly I would grab the pixels of the main picture allocate them into the 9 smaller images That is a very abstract answer..
you will make a double for loop , remember that each image is a two dimensional array of pixels you will divide the width and height of the pic by 3 and use the numbers that come as "limit vars" that will define the spectrum of your for loops . so that you have a loop from pixels 1 to 100 from 100 to 200 and 200 to 300 (if your image is 300x300. 1,100,200,300 would be replaced by the vars.
after grabbing the pixels you will allocate them into a new image and then end the for loop and go to the other one.
I would also use a c++ vector to push back the images into...
there are other objects for images outhere if you don't like UIImage
Replies
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesomeyou will make a double for loop , remember that each image is a two dimensional array of pixels you will divide the width and height of the pic by 3 and use the numbers that come as "limit vars" that will define the spectrum of your for loops . so that you have a loop from pixels 1 to 100 from 100 to 200 and 200 to 300 (if your image is 300x300. 1,100,200,300 would be replaced by the vars.
after grabbing the pixels you will allocate them into a new image and then end the for loop and go to the other one.
I would also use a c++ vector to push back the images into...
there are other objects for images outhere if you don't like UIImage
http://developer.apple.com/library/ios/#documentation/uikit/reference/UIImage_Class/Reference/Reference.html
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeAdding a method like this:
UIImage* subimage = [originalImage subimageWithRect:CGRectMake(0, 0, 100, 100)];Should be useful for you.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome