다른 사람들이 이미지를 메모리에로드 할 때 정확한 C# 코드가 이미지를 저장하는 데 더 많은 메모리를 사용한다는 사실을 알고 싶습니다. (자바에서 1.5 배).C#에서 BitmapFactory.DecodeFile을 사용할 때 메모리 풋 프린트가 더 큽니다. (작은 이미지의 경우 거대한 메모리)
105.5 MB의 총 메모리 크기의이 자바 코드 결과 : 148.1 MB에서
Bitmap[] bitmaps = new Bitmap[100];
for (int i = 0; i < 100; i++)
{
String root = Environment.getExternalStorageDirectory().getAbsolutePath();
String imagePath = "/evolution/threesixty/216/Edaphosaurus_001.jpg";
bitmaps[i] = BitmapFactory.decodeFile(root + imagePath);
}
이 C# 코드 결과 :
가Bitmap[] bitmaps = new Bitmap[100];
for (int i = 0; i < 100; i++)
{
string root = Environment.ExternalStorageDirectory.AbsolutePath;
string imagePath = "/evolution/threesixty/216/Edaphosaurus_001.jpg";
bitmaps[i] = BitmapFactory.DecodeFile(root + imagePath);
}
사람이에 관해서는 어떤 아이디어가 있습니까 왜? .NET 래퍼가 여분의 바인딩 데이터 나 물건을 보관하기 위해 조금 더 사용할 수는 있지만 그 정도는 아닙니다. 측면 질문으로
또한: 각각의 이미지는 60킬로바이트 디스크에에게있다, 왜 인 메모리 버전 1메가바이트? 내 로딩 방법은 샘플링/밀도 검사를 수행하지 않는다는 것을 알고 있지만 목표가 아닙니다. 확실히 012KB100KB 이미지로드시 100KB의 메모리 공간을 초과하지 않아야합니까? 여기
내가 사용하고있는 이미지 (994x748px @ 300DPI) : 안드로이드 메일 링리스트에 대한 모노의 응답을 바탕으로
방문 : http://mono-for-android.1047100.n5.nabble.com/ 대형 문자 - 사용 - 비트 맵 팩토리 - 코드 파일 - -image-td5710394.html; cid = 1340028135060-792 (메일 링리스트 스레드 용) – Cheesebaron
두뇌 방귀가 있었음에 틀림 없다 ... – Matthew