Three years ago I wrote two articles about how to use the NextGen Custom Fields plugin with NextGen Gallery to link the images to a post or page. The articles are still two of the most visited and ones that I receive the most questions about. And, the instructions still work!
At the time, the one caveat about the NextGen Gallery customizations is that the plugin could not be updated with losing the customizations. Or you would need to copy the changes, upgrade the plugin, and then add the customizations back in.