..could be better but hey, there ya go. Uses image 9999 to work out and return either half the width or half the height, combined you can set the sprite offset so 0,0 is the middle of the sprite.
Usage Example -
offset sprite 1,getoffset("x",11),getoffset("y",11)
Function -
function getoffset(xory$,image)
if sprite exist(9999)=1 then delete sprite 9999
sprite 9999,0,0,image
if xory$="x" then returnval=sprite width(9999)/2
if xory$="y" then returnval=sprite height(9999)/2
delete sprite 9999
endfunction returnval