Note that there are some explanatory texts on larger screens.

plurals
  1. PODo iOS Core Image Blend Modes differ from Photoshop Blend Modes?
    primarykey
    data
    text
    <p>I am using CIFilter and the CIHueBlendMode in order to blend an image (foreground) and a red layer (background)</p> <p>I am doing the exact same thing in Photoshop CS6 with the Hue Blend Mode (copied the foreground image and used the same red to fill the background layer)</p> <p>Unfortunately the results are very different: <img src="https://i.stack.imgur.com/Dh4Gp.png" alt="enter image description here"> (and the same applies to comparing CIColorBlendMode, CIDifferenceBlendMode and CISaturationBlendMode with their Photoshop counterparts)</p> <p>My question is: Is it me? Am I doing something wrong here? Or are Core Image Blend Modes and Photoshop Blend Modes altogether different things?</p> <pre><code>// Blending the input image with a red image CIFilter* composite = [CIFilter filterWithName:@"CIHueBlendMode"]; [composite setValue:inputImage forKey:@"inputImage"]; [composite setValue:redImage forKey:@"inputBackgroundImage"]; CIImage *outputImage = [composite outputImage]; CGImageRef cgimg = [context createCGImage:outputImage fromRect:[outputImage extent]]; imageView.image = [UIImage imageWithCGImage:cgimg]; CGImageRelease(cgimg); // This is how I create the red image: - (CIImage *)imageWithColor:(UIColor *)color inRect:(CGRect)rect { UIGraphicsBeginImageContext(rect.size); CGContextRef _context = UIGraphicsGetCurrentContext(); CGContextSetFillColorWithColor(_context, [color CGColor]); CGContextFillRect(_context, rect); UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); return [[CIImage alloc] initWithCGImage:image.CGImage options:nil]; } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload