Added support to save resource to file and extract all images