내 앱에 이미지보기가 있습니다. 3ds max에서 내 보낸 jpg 파일을 보여 주려고 할 때 작동합니다. 그러나 Photoshop에서 나온 것이라면 아무 것도하지 않습니다. 왜 그런가요? 그것은 모든 중요한 내 응용 프로그램에있는 다음 코드를 사용하여 내 서버에서 이미지를 얻는 경우Android 이미지 뷰는 일부 jpg 만 허용합니다.
public static Bitmap getWebImage(String URL)
{
URL myImageURL = null;
Bitmap bitmap = null;
try {
myImageURL = new URL(URL);
} catch (MalformedURLException error) {
error.printStackTrace();
}
try {
HttpURLConnection connection = (HttpURLConnection)myImageURL .openConnection();
connection.setDoInput(true);
connection.connect();
InputStream input = connection.getInputStream();
bitmap = BitmapFactory.decodeStream(input);
} catch (IOException e) {
e.printStackTrace();
}
return bitmap;
}
안녕하세요, 해결하셨습니까? Photoshop에서 생성 한 jpeg와 정확히 같은 문제가 있습니다. ( – TiGer
예, Photoshop에서 저장하면 "웹 및 장치 용으로 저장"으로 이동해야합니다. – Bananable