title: sending an image and return it using json?
body: <p>im trying to send image to a webservice in php using json, but the client cnt read the image..
  when i return it back!! </p>
  
  <pre><code>&lt;?php
  
  //recieve the image
  
  $media = json_decode($_POST['media']);
  
  header('content-type: image/jpeg');
  $image = imagecreatefromjpeg($media);
  imagefilter($image,IMG_FILTER_GRAYSCALE);
  imagefilter($image,IMG_FILTER_COLORIZE,100,50,0);
  imagejpeg($image, '', 90);
  imagedestroy($image);
  
  //return image
  
  $response = array(  
           'image' =&gt; $image
       );  
       echo json_encode($response);
  
  ?&gt;
  </code></pre>
  
  <p>from the code, is there anything I'm doing wrong? Thanks!!! :))</p>