another way to do it would be to add a blank index.html page in the folder. This way when someone tries to enter directly to the folder they will get a blank page. If not a blank page then put a page with a forwarder in the meta tag to go back to your gallery home page.
Also with cPanel you can use the HotLink Protection along with V@no's mod.