Convert data urls to canvas and vice versa.