OutFormImageName(dummyrecord,"F_SOMETHING","myimage.png")
You have to have "myimage.png" attached to dummyrecord which can be any record. Needs to be like this so the code can run on both client and server. You could automatically attach images to dummyrecord from HAL.
Erik