you'll need to add a new form feild to accept the user text, and then take that text and either store it in a text file, or what is probably a better idea is to store it in a database with other information about the image and such (like the location where the image is store, or width and height, or other information).
As far as limiting to just images... check out:
http://www.php.net/manual/en/features.file-upload.php
specifically $FILES['filename']['type'] which will give you the MIME type of the file (like image/jpeg or image/gif) and you can compare that to a list of acceptable types to make sure only images are uploaded. You can also use the info in $FILES[] to make sure the image file sizes aren't too big. If you need to check dimensions, look at the GD image functions in the manual.