Have a look at the NoteCollection class. You can use it to create a collection of (for instance) Image resource notes.
Loop through the collection, retrieve the notes/ documents and compare the $TITLE item on the note with the name of the Image you're trying to retrieve. You can probably get a handle on the image itself by using the getAttachment("filename") method.
Mark