이미지를 서버에 업로드 할 때 MIME 멀티 파트를 사용하고 있습니다. 때때로 이미지가 왜곡됩니다. 이 문제를 해결하는 방법은 무엇입니까? 참고 : 왜곡 된 의미는 일부 픽셀이 손실되었음을 의미합니다. 내가 업로드를 위해 다음과 같은 코드를 사용하고 있습니다 :업로드 중에 이미지가 왜곡됩니다.
File file = new File(filePath[0]);
HttpClient httpClient = new DefaultHttpClient();
HttpContext localContext = new BasicHttpContext();
HttpPost httpPost = new HttpPost("serverurl");
MultipartEntity entity = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE);
entity.addPart("Content-Type",new StringBody("multipart/form-data;charset=utf-8"));
entity.addPart("Content-Length", new StringBody(String.valueOf(file.length())));
entity.addPart("UploadContentPostD", new FileBody(file));
entity.addPart("DocumentName", new StringBody(file.getName()));
httpPost.setEntity(entity);
HttpResponse response = httpClient.execute(httpPost,localContext);
BufferedReader reader = new BufferedReader(new InputStreamReader(response.getEntity().getContent(), "UTF-8"));
왜곡 된 이미지는 다음과 같습니다
왜곡 된 단어의 의미를 정확히 설명해주세요. 잘못된 픽셀/종횡비가 변경되었거나 픽셀이 손상 되었습니까? – Elemental
픽셀이 손실되어 일부분이 다른 부분과 겹쳐진 것처럼 보입니다. – Sandy