[안드로이드] 안드로이드 앱에서 서버에 String형태로 이미지 전송하기
이미지 -> Base64 encode로 String처리해서 서버에 전송했다.
서버에서는 String을 png형태로 받는다.
1. 가장 중요하게 참조한 자료
https://base64.guru/developers/php/examples/decode-image
Convert Base64 to image in PHP | Examples | PHP | Developers | Base64
Convert Base64 to image in PHP To convert a Base64 value into an image in PHP, you need base64_decode and any function to write binary data to files. Before decoding the data, make sure that you do not need to normalize the Base64 value. To decode a Base64
base64.guru
2. 공식문서라서 참조함
PHP: imagepng - Manual
Trying to resize a png 256 colors image and save it in 256 colors with a correct color palette ? (if you'll save a 256 color image in truecolor palette the result image will have a big size).I spent some hours trying various function to get a good quality
www.php.net
2-1)공식문서로서 위에 것 보다 강력하게 참조함. 예시도 잘 나와있음.
https://www.php.net/manual/en/function.imagecreatefromstring.php
PHP: imagecreatefromstring - Manual
I'm trying to get the imagecreatefromstring to work with GIFs. Of course, it won't.I've read the tips but can't get them to work either.The following is what I tried, based on above tips:--- header('Content-Type: image/gif'); header('Content-Disp
www.php.net
3. 여기서도 String으로 변환함. 근데 너무 김
https://www.thecrazyprogrammer.com/2016/09/android-upload-image-server-using-volley.html
Android Upload Image to Server Using Volley - The Crazy Programmer
Here you will learn about android upload image to server using volley library. At server side I have used java web service and for sending image to server volley library is used.
www.thecrazyprogrammer.com