简体   繁体   中英

Edge blending of image with alpha on iOS after masking color

I have an image that has been masked with a range of colors using

CGImageCreateWithMaskingColors()

Everything works fine, but the edge of the image (we are using a green screen for profile pictures) is pixelated. I've tried drawing the image in an image context and a bitmap context with the proper antialiasing, but the edges remain the same.

Any suggestions on how to smooth the sides of the profile after it has been masked?

You could try zooming the mask image larger by some multiple (say 2X, 3X or 4X) before creating the mask. Then a size-reduced copy of this larger mask might be better antialiased.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM