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.
Notice the bad access point when I try to assign a value back to m_PixelBuf. Anybody have any idea why this is occuring? What in iOS 6 would cause this? Been scratching my head for hours.
Notice the bad access point when I try to assign a value back to m_PixelBuf. Anybody have any idea why this is occuring? What in iOS 6 would cause this? Been scratching my head for hours.
Thanks in advance for the help.
Note that processing an image by manipulating every byte in code is NOT a very efficient way to do it. It forces the CPU to process every byte of every pixel, and then package up the data and hand it back to the GPU.
You'd be much better off finding a way to do the same thing with the GPU, if at all possible. There are quite a few Core Image filters available starting in iOS 5, and even more in iOS 6. Hopefully you can find one that does what you want.
Failing that, you might want to write an OpenGL shader that does what you want. You could pass in your image as a texture and have the shader manipulate it hand hand it back as another texture. With CVPixelBuffers you can map the source and destination textures directly to CIImage objects, or display the destination texture directly to the screen.
It would be really good if Apple would wither release OpenCL for iOS, or let us write our own Core Image Filters like we can on Mac OS (Or better yet, both.) I've been told that if you dig around in iOS you will find that OpenCL is actually there as a private framework. Apple just needs to release it. It would make this sort of image processing much, much cleaner and faster.
Regards,
Duncan C WareTo
Animated GIF created with Face Dancer, available for free in the app store.
Replies
It appears that under iOS6, we need now to use the Mutable variants of these methods:
CFDataRef m_DataRef = CGDataProviderCopyData(CGImageGetDataProvider(inImage));
->
CFMutableDataRef m_DataRef = CFDataCreateMutableCopy(0, 0, CGDataProviderCopyData(CGImageGetDataProvider(inImage)));
UInt8 * m_PixelBuf = (UInt8 *) CFDataGetBytePtr(m_DataRef);
->
UInt8 *m_PixelBuf=(UInt8 *)CFDataGetMutableBytePtr(m_DataRef);
- Spam
- Abuse
- Troll
3 • Off Topic Insightful Disagree Dislike Like 3Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesomeit helped me alot....
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesomethanks it help me a lot...
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeYou'd be much better off finding a way to do the same thing with the GPU, if at all possible. There are quite a few Core Image filters available starting in iOS 5, and even more in iOS 6. Hopefully you can find one that does what you want.
Failing that, you might want to write an OpenGL shader that does what you want. You could pass in your image as a texture and have the shader manipulate it hand hand it back as another texture. With CVPixelBuffers you can map the source and destination textures directly to CIImage objects, or display the destination texture directly to the screen.
It would be really good if Apple would wither release OpenCL for iOS, or let us write our own Core Image Filters like we can on Mac OS (Or better yet, both.) I've been told that if you dig around in iOS you will find that OpenCL is actually there as a private framework. Apple just needs to release it. It would make this sort of image processing much, much cleaner and faster.
Duncan C
WareTo
Animated GIF created with Face Dancer, available for free in the app store.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome