contour (boundary) highlighting of sprites

i am trying to highlight sprites throughout contours.
any ideas how to implement it without using an extra sprite .
(one of the method is add a highlighted sprite behind the main sprite - bad idea)
is it possible using a single sprite ?

this must look like the yellow line along the contours. (for details refer to images attached)


highlight.png (56.1 KB)


glow.png (11.7 KB)

bump

i got one thing
i need to apply marching squares algorithm

http://www.cocos2d-iphone.org/forum/topic/19428

http://devblog.phillipspiess.com/2010/02/23/better-know-an-algorithm-1-marching-squares/

You could use a pixel shader to identify contour pixels of your sprite. I do that to make them black (in order to
have a better visual segmentation of sprite/background, even if in the end i do that only off-line). Once you have
such functionalty (which, however, will work only with opengl es 2.0 or higher), you can draw a red border, for example, around
your sprite easily or change the original border or add a thicker border.