This is the function I use in my sprite system. It will handle rotated and animated images. You'll have to make a few changes to it to make it work with images though, because you'll need to tell it the rotation and scale of both the image and rect, as well as the frame the image is displaying.
This won't interefere with any other collision code you might have because it uses the same temporary collision layer users are not intended to access which the other collision functions use.
Method OverlapsRect%(RectX#, RectY#, RectWidth#, RectHeight#, RectRotation#=0)
Local Result%
' Clear collision layer 32.
' Using layer 32 because it is a scratch layer used by some internal functions and will probably not be used by the user.
ResetCollisions COLLISION_LAYER_32
' Place sprite in collision layer 32.
SetRotation Rotation#(True)
SetScale ScaleX#(True), ScaleY#(True)
CollideImage _Image, X#(True), Y#(True), Frame#(True), 0, COLLISION_LAYER_32
' Set Result to true if rect is colliding with the image we just placed in collision layer 32.
' (Rect is not written to collision layer.)
SetRotation RectRotation#
SetScale 1,1
If CollideRect(RectX#, RectY#, RectWidth#, RectHeight#, COLLISION_LAYER_32, 0) <> Null Result = True
Return Result
End Method
The Rotation() ScaleX() Frame() etc functions are getting the sprite's parameters, so those are what you need to pass to the function for the image.