Hi
I would think, that is a job for "ze gimp"...? I seem to remember having read somewhere, it's got tools for this type of thingy, but boy is that an advanced piece of kit, I wouldn't know where to start looking...
...How about 'LazPaint', it can also do all sorts of clever stuff, @circular would know that.
Regards Benny