Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

rickjackson

macrumors newbie
Original poster
Dec 24, 2010
25
0
Hello to all,

I am new to iPhone Development and even new to Image Processing but guyz i all of your help I am learning Image Processing in Bits and Pieces What i have learned so far is that how can i obtain the Actual pixel data from CGImage object and how to create a new modified image here is the code :

Code:
    CGImageRef sourceImage = theImage.image.CGImage;

    CFDataRef theData;

    theData = CGDataProviderCopyData(CGImageGetDataProvider(sourceImage));
    
    UInt8 *pixelData = (UInt8 *) CFDataGetBytePtr(theData);
    
    int dataLength = CFDataGetLength(theData);

But right now i am struck at a point how can i increase/Decrease the sharpness of UIIMageView With a Slider.

Please share your thoughts with us so it will benefit all of us in someway.........

Regards,
 
Have a look at the sample project GLImageProcessing. I think it has what you are after.
 
Have a look at the sample project GLImageProcessing. I think it has what you are after.

Hello Dantastic thanks for your reply........

Since i have not worked on OpenGL so its hard to understand that code but i have found this article which explains about image processing but not in detail here is the link http://www.fiveminutes.eu/iphone-image-processing if any 1 points me to some algorithm for brightness, saturation, hur, sharpness and contrast then it will be very good.
 
Last edited:
If it's core image you want to use have a look at the Documentation. There are a few methods there to sharpen and blur an image. Pick the one that would suit your needs.

I suggest retaining the original image at slider mid point and when values are at the lower end of the slider use a blur function and at the higher end a sharpening function. make sure to always use the original image so you don't compound the effects.
 
If it's core image you want to use have a look at the Documentation. There are a few methods there to sharpen and blur an image. Pick the one that would suit your needs.

I suggest retaining the original image at slider mid point and when values are at the lower end of the slider use a blur function and at the higher end a sharpening function. make sure to always use the original image so you don't compound the effects.

Hello Dantastic I have found information about Core Image and its not available in iPhone check this link out : http://stackoverflow.com/questions/2105475/iphone-core-image-filter
 
CGImages are Immutable, With Exceptions?

... but i have found this article which explains about image processing but not in detail here is the link http://www.fiveminutes.eu/iphone-image-processing if any 1 points me to some algorithm for brightness, saturation, hur, sharpness and contrast then it will be very good.

That link is interesting. The guy is changing a CGImage when Apple says that CGImages are immutable; here and here. I suppose since he isn't actually displaying the input image that it might be safe, but I wonder if it would have been safer to do the change by writing the altered bytes into a new image buffer that CGBitmapContextCreate() could have created for him which is rather quick. Can someone with more CG experience shed some further opinion on this please?

Regarding the rest. A verbal discussion I was in lately suggested that since Apple doesn't supply Core Image in iOS, that you're on your own to create or find a library that does those things. In my case, I'm looking for methods to feather CG strokes in realtime.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.