convert data uri to resource images