Render mask base64 string without \n and =
Refactors base64decode and drawing on canvas