Uploading an image from a form in my custom module
You shoud use Drupal file managing system. When Drupal is aware of a file, its data is stored in the file related tables. If you need to do something with a file you only need its identifier, called fid.

So, in your form upload the file using Drupal Form API, and store the fid in your table. Whenever you need to do something with the file use the fid to get all the file information.

This question may be very interesing for you:
Managed file: the file used in the field may not be referenced

Check also the file_managed Form API element:
https://api.drupal.org/api/drupal/developer!topics!forms_api_reference.html/7#managed_file