don't close parent memory streams until finished with image