You posted not enough informations, but I guess you just wanted to know is that possible you ask for.
Yes, it is, however I'm aware there are many (un)willing people here they could do it better and more accurately.
Anyway till anyone else propose his solution, you can try mine:
preferences.rulerUnits = Units.PIXELS
d = 20, m = 3, (h = (aD = activeDocument).height) > (w = aD.width) ? s = w : (s = h, d /= 2, m /= 1.5)
aD.selection.select([[(f = h / d), f * (d - m)], [m * f, f * (d - m)], [m * f, f * (d - 1)], [f, f * (d - 1)]])
function loop(v1, v2) {for(i = v1; i < v2; i++) v1+= hst; return v1}
blk = loop(0, l2 = (l1 = (hst = aD.histogram).length) / 2), wht = loop(l2, l1)
open(File('~/desktop/watemark/logo_' + (blk > wht ? 'white' : 'black') + '.png')),
(log = activeDocument).resizeImage(s / 7.5), (sel = log.selection).selectAll(), sel.copy()
log.close(SaveOptions.DONOTSAVECHANGES), aD.paste()
After I wrote my code I realised you wanted logo to have same dimmension irrespecitvely of opened document format.
Well you can change last 2 lines of code to this:
(sel = (log = activeDocument).selection).selectAll(), sel.copy()
log.close(SaveOptions.DONOTSAVECHANGES), aD.paste()
however when logo has other resolution than opened image then result won't be that you expected. If so, replace this part of the first code:
(log = activeDocument).resizeImage(s / 7.5)
with
(log = activeDocument).resizeImage(null, null, aD.resolution)
Ah, and this code is of course only for a start, so you can test it and basing on the present result it gives, tell me how you'd like that was modified...