나는 다음과 같이 다음을 비트 맵 이미지를 지정 IsolatedStorage
에서 이미지 스트림을 얻을려고오류가
The component cannot be found. (Exception from HRESULT: 0x88982F50)
을 업데이트 블록을 사용하여 제거했지만 여전히 그 행에 도달하면 오류가 발생합니다. 어쩌면 처음에 파일을 잘못 쓰는 것일까 요? 이 파일을 저장하기 위해 무엇을합니까 :
IsolatedStorageFile isolatedStorage = IsolatedStorageFile.GetUserStoreForApplication();
if (!isolatedStorage.DirectoryExists("MyImages"))
{
isolatedStorage.CreateDirectory("MyImages");
}
var filePath = Path.Combine("MyImages", name + ".jpg");
using (IsolatedStorageFileStream fileStream = new IsolatedStorageFileStream(filePath, FileMode.Create, isolatedStorage))
{
StreamWriter sw = new StreamWriter(fileStream);
sw.Write(image);
sw.Close();
}
'SetSource'가 콘텐츠를 즉시 또는 나중에로드하는지 기억이 안납니다. 스트림을 폐기하지 않고도 시도해 볼 수 있습니까? ('using' 블록없이) –
HResult는 이미지 파일의 디코더를 찾을 수 없을 때 생성됩니다. BitmapImage가 파일을 읽을 수있는 기회를 갖기 전에 플로어 매트를 흔들어서 파일을 처리하면 확실히 설명 할 수 있습니다. –
@KooKiz 질문을 업데이트했습니다 – user2757047