# ImageAdd or ImageSubtract on interior / masked part of image

I'm making a little icon to be the default favicon in my website template. To do this I'm taking one of those dumb little globe network icons and merging it with the v11 Mathematica spikey icon. The final product looks like this:

At favicon size it's not really noticeable, but it's fun anyway.

The way I'm doing this is by taking the spikey image and the globe image:

spikey =
CloudImport[
CloudObject[
"https://www.wolframcloud.com/objects/b3m2a1.testing/img/spikey.png"]];
baseIcon =
CloudImport[

CloudObject[
];


And then merging the spikey AlphaChannel with the baseIcon and then dilating the whole mess:

baseMask =
With[{
chan = AlphaChannel[spikey],
ppos = PixelValuePositions[AlphaChannel[spikey], White]
},
ReplacePixelValue[
chan,
ppos ->
PixelValue[baseIcon, ppos]
]
]
];


before finally setting that as the spikey alpha channel:

newImg = SetAlphaChannel[spikey, mask]


The problem is this is a rather slow process. PixelValuePositions is slow and can be finnicky and ReplacePixelValue is slow, too (and honestly even PixelValue can be).

So I'd rather do this with ImageAdd and ImageSubtract.

Unfortunately, neither of these really reproduce what I want when I use them by default.

Is there a good way to do this? I.e. apply an ImageAdd/ImageSubtract only to a masked part of an image?

Like that?

With[{alpha = AlphaChannel[spikey]}
, Dilation[