ios - CGImageCreateWithMaskingColors returns null -


I have a scene with black text around which I want to make a white "glow" I think I can grab a screenshot, reverse the colors (it's just black and white), transparent masking with black, and the resulting image "irritable" in each direction. When I try to mask the blackmoney with the CGImage buyer, the masking color I get a null CGImageRef so far I have it.

  // First get a screenshot in a CI image so that I can apply a CI filter UIGraphicsBeginImageContext (self.view.frame.size); CGContextRef Reference = UIGraphicsGetCurrentContext (); [Self.view.layer renderIncontext: context]; CImage * CIIGJS = [[CIMAge ALOOC] Initvith CGImage: [UigRXGetImageFrenchInsources ContactCGImage]]; UIGraphicsEndImageContext (); // Now CIColorInvert Filter CIFilter * Filters = [CIFilter filterWithName: @ "CicolorInvert" keys and Values: kCIInputImageKey, ciImage, Zero] Apply; CiImage = [filter value forKey: kCIOutputImageKey]; // Now I need to get a CG image from the CI image. I CIContext * ciContext = [CIContext contextWithOptions: zero]; CGImageRef Ref = [ciContext createCGImage: ciImage fromRect: [ciImage extent]]; // now I try to mask the blackcast float masking color [6] = {0,0,0,0,0,0,0,0}; Referee = masking collar (ref, masking color) with CImmej cutet; // referee (empty)   

I know that alpha channels can mess things up but I do not think I have any alpha channel here just to check I have CGImageGetCollar Space and got KCG color space RGB , no alpha channel found.

Can anyone tell me where I am wrong? Alternatively, a quick comment is being made to me to understand the differences between UIMJ, CIMAge and CGImage. image parameter on the document for

CGImageCreateWithMaskingColors Description:

Image for the mask This parameter can not be an image mask, it may not have any image mask or mask color already, and Not an alpha component .

You should

And in the case of getting rid of that Pesky alpha channel, I think that you would find it useful The question will be found: / P>



Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -