How to soften edges with code?

here is a jpg showing my problem:
http://rakbiz.com/CityWithLogo.JPG

The city is a photo and in the lower right corner there is a logo placed over it.

the logo needs a black background to look right (ie:the back square around it).

is there some way to use a mask or something to soften the black square frame of the logo tpo blend into the picture programatically, I don’t want to have to change the photo everytime it changes to blend to the black.

Thanks for your help!

GBY,
-R