title: Decode base64 image in Grails
body: <p>I have a post api where I am sending a json string which contain the base64 encoded image.Below is the json string </p>
  
  <pre><code>{ "imageData":"base64encoded string",
    "status":"1"
  }
  </code></pre>
  
  <p>where base64encode string is iVBORw0KGgoAAAANSUhEUgAAAHgAAACgCAIAAABIaz/HAAAAAXNSR0IArs4c6QAA\r\nABxpRE9UAAAAAgAAAAAAAABQAAAAKAAAAFAAAABQAABWL3xrAqoAAEAASURBVHgB\r\nlL2Fe1t7mueZme6uewNGMUu2LNkyySSjDJKZmZkSO8zM7CTmmJnZYbxUVbdgsKp7\r\nqqdrdp</p>
  
  <p>I cant post the complete encoding since its too lengthy. How can I convert this encoded string into a image file at server side.Actually from there I suppose to upload the image on a ftp server.</p>