Add support for garbage collecting images.

Closes #157 
indeed it does.  copy and paste from the old function.  Removed.