Php 从android studio到laravel中jpeg的位图图像

Php 从android studio到laravel中jpeg的位图图像,php,laravel,laravel-5,laravel-5.1,Php,Laravel,Laravel 5,Laravel 5.1,我从android studio发送位图格式,在代码中,我得到了这种格式的图像位图格式,如何将其转换为jpeg格式并保存到我的公用文件夹中 $images = $request->input('expense_file'); //on echo (android.graphics.Bitmap@41c9d270) $binary = base64_decode($images); file_put_contents(public_path().'/images/image.jpg',

我从android studio发送位图格式,在代码中,我得到了这种格式的图像位图格式,如何将其转换为jpeg格式并保存到我的公用文件夹中

$images = $request->input('expense_file'); //on echo (android.graphics.Bitmap@41c9d270)
 $binary  = base64_decode($images);
 file_put_contents(public_path().'/images/image.jpg', $binary);

为什么您的服务器接收到
android.graphics。Bitmap@41c9d270
?它应该接收base64编码字符串,而不是这个。我正在从androidHmmm发送位图格式的图像。。。不要那样做。是什么让你认为PHP可以解码android位图?发送前只需对位图进行base64编码!