You should always check for success in loading an image before trying to do something with it.
if menu > 0 then
MidHandle (menu)
MaskImage (menu,255,0,255)
High=ImageHeight (menu)
else
; uh oh!
end if
if menu > 0 then
MidHandle (menu)
MaskImage (menu,255,0,255)
High=ImageHeight (menu)
else
; uh oh!
end if