How do you save a programmaticly created texture to a file

hdr is THE format no package can display, how do I change the target to use png format IN BLUEPRINT ?