Android Calling URL with BASE64 String Throwing exception
<p>if i debug the app and copying the mUrl and execute in browser it is working fine(image and message both are posting) and returning valid JSON result, but if call web service  using below code it is throwing an error (not a n valid png image)</p>

<pre><code>Url += "&amp;text="+ mMessage;
                    mUrl += "&amp;photo=" + Base64.trim();
                    JSONArray ja = null;
    mUrl.trim();
</code></pre>

<p>//Here i'm copying the mUrl </p>

<pre><code>   try {

                        URL urlconn = new URL(mUrl);
                        URLConnection tc = urlconn.openConnection();
                        BufferedReader in = new BufferedReader(
                                new InputStreamReader(tc.getInputStream()));
                        String line;
                        String Stingbuffer = "";
                        while ((line = in.readLine()) != null) {
                            Stingbuffer += line;
                        }
</code></pre>

<p>//this is returning </p>

<blockquote>
  <p><br /><b>Warning</b>:  imagecreatefrompng() [function.imagecreatefrompng]:
  gd-png:  fatal libpng error: Read Error: truncated data in
  <b>/home/hbmobile/public_html/webservice/SocialNetworking/WS/imagecrop.php</b>
  on line <b>26</b><br /><br /><b>Warning</b>:  imagecreatefrompng() [function.imagecreatefrompng]:
  gd-png error: setjmp returns error condition in
  <b>/home/hbmobile/public_html/webservice/SocialNetworking/WS/imagecrop.php</b>
  on line <b>26</b><br /><br /><b>Warning</b>:  imagecreatefrompng() [function.imagecreatefrompng]:
  '/home/hbmobile/public_html/webservice/SocialNetworking/public/upload/temp/message.png'
  is not a valid PNG file in
  <b>/home/hbmobile/public_html/webservice/SocialNetworking/WS/imagecrop.php</b>
  on line <b>26</b><br />ImageMagick: Corrupt image</p>
</blockquote>

<p>any help please</p>
