Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7919667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T15:56:30+00:00 2026-06-03T15:56:30+00:00

my iOS device doesn’t do any process with CITemperatureAndTint and CIToneCurve but, in case

  • 0

my iOS device doesn’t do any process with CITemperatureAndTint and CIToneCurve

but, in case of CISepiaTone is doing right !!

outputImage = [CIFilter filterWithName:@"CIToneCurve" keysAndValues:@"inputImage", image, @"inputPoint0", [CIVector vectorWithX:0 Y:0], @"inputPoint1", [CIVector vectorWithX:0.25 Y:0.25], @"inputPoint2", [CIVector vectorWithX:0.5 Y:0.5], @"inputPoint3", [CIVector vectorWithX:0.75 Y:0.75], @"inputPoint4", [CIVector vectorWithX:1 Y:1], nil].outputImage;

Is there any problem with that??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T15:56:31+00:00Added an answer on June 3, 2026 at 3:56 pm

    Use this code : It works

    - (UIImage*)applyToneCurve:(NSArray*)pointArray {
    
        if ([pointArray count] < 2) {
            return self;
        }
    
        CGPoint first = [[pointArray objectAtIndex:0] CGPointValue];
    
        first.x /= 255.0;
        first.y /= 255.0;
    
        CGPoint firstPoint = first;
    
        CGPoint last = [[pointArray lastObject] CGPointValue];
    
        last.x /= 255.0;
        last.y /= 255.0;
    
        CGPoint fifthPoint = last;
    
        CGPoint secondPoint = CGPointMake(0.25, 0.25);
        CGPoint thirdPoint  = CGPointMake(0.50, 0.50);
        CGPoint fourthPoint = CGPointMake(0.75, 0.75);
    
        for (int i = 1; i < [pointArray count] - 1; i++) {
    
            CGPoint point = [[pointArray objectAtIndex:i] CGPointValue];
    
            point.x /= 255.0;
            point.y /= 255.0;
    
            if (i == 1) {   
                secondPoint = point;
            }
            else if (i == 2) {
                thirdPoint = point;
            }
            else if (i == 3)
                fourthPoint = point;
    
        }
    
        CIImage *inputImage = [CIImage imageWithCGImage:self.CGImage];
    
        CIFilter *toneCurveFilter = [CIFilter filterWithName:@"CIToneCurve"];
        [toneCurveFilter setDefaults];
        [toneCurveFilter setValue:inputImage forKey:kCIInputImageKey];
    
        [toneCurveFilter setValue:[CIVector vectorWithX:firstPoint.x  Y:firstPoint.y] forKey:@"inputPoint0"];
    
        [toneCurveFilter setValue:[CIVector vectorWithX:secondPoint.x  Y:secondPoint.y] forKey:@"inputPoint1"];
    
        [toneCurveFilter setValue:[CIVector vectorWithX:thirdPoint.x Y:thirdPoint.y] forKey:@"inputPoint2"]; 
    
        [toneCurveFilter setValue:[CIVector vectorWithX:fourthPoint.x Y:fourthPoint.y] forKey:@"inputPoint3"]; 
    
        [toneCurveFilter setValue:[CIVector vectorWithX:fifthPoint.x Y:fifthPoint.y] forKey:@"inputPoint4"];
    
        CIImage *outputImage = [toneCurveFilter outputImage];
    
        CGImageRef ref = [[CIContext contextWithOptions:nil] createCGImage:outputImage fromRect:outputImage.extent];
    
        UIImage *result = [UIImage imageWithCGImage:ref];
    
        if (ref) {
    
            CGImageRelease(ref);
        }
    
        return result;    
    }
    

    PointArray contains 5 NSValue points of curve from start to end.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

-webkit-device-pixel-ratio query is supported by both iOS and Android but since iOS does not
I know how to detect device orientation change on iOS in Safari, but I
I'm developing a web app for iOs device, but I have a problem with
Does iOS offer a way for an app to query the device for information
When iOS device registers for remote notifications, it registers with the Apple Service by
I need to know which iOS device is currently running app (saying more exactly
When sending data from one iOS device to another, I receive these errors. 2012-06-21
How can I edit /etc/hosts on my iOS device? I just do sudo nano
As we all know tracking the position of a moving iOS device can be
In my application i need to find which ios device is being used. Now

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.