Domanda

I've got a UIImage with black text on it and I'd like to add a "glow" effect around the letters of the text. In a graphics editing program such as GIMP or photoshop I can select by color and stroke the selection with the current brush to get the glow effect. I know how to stroke a path, but how can I select by color in obj-c?

È stato utile?

Soluzione

You can't just 'select by color'.

From your description I would look at using mask images. Take a copy of your image, scale and blur it and use that to mask a color wash.

If that won't work due to other contents in your image then you will need to look at flood fill algorithms (which is a potential basis of 'select a color' implementations).

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top