Open source and hAkRz ideology aside...
Hiding your source and/or images the way you describe will not sove the problem that you talk about at the end of your post; preventing people from stealing / viewing / learning from your source code or images.
Even if you have a program to feed the image to the browser as in your example, the image has to be returned the browser, anyway, so that it can be displayed. A visitor only needs to right click the image and save it to their hard drive. The only thing accomplished has been hiding the original file name and/or location of the file in the server's directory tree.
The same is true of page source. You can feed it to the browser anyway you want, but it still gets to the browser and can be viewed by a visitor using any number of utilities. You still have only hidden the original file name and/or location, nothing else.
-- Rich Rijnders
-- Irvine, CA US