0
다음은 내 BinaryReader 루프입니다. 진행 상황을 보려면 단계별로 시도했지만 위치 변수 설정으로 돌아 가면 "433939"에서 "433941"로 이동합니다. else는이 루프와 상호 작용하며,이 루프를 전혀 거치지 않지만 433939에서 433940으로 이동하는 대신이 루프를 건너 뜁니다. 내가 여기서 누락 된 것이 있습니까? 내가 이상 단계 또는 중대한에 모든 인 점은 전혀 도움이되지 않습니다 휴식 말했듯이, 잘못 어디로 정말 보이지 않아요BinaryReader 미리 위치에서 건너 뛰기
while (Binary.BaseStream.Position < Binary.BaseStream.Length)
{
CurrentData = Binary.ReadByte().ToString("X2");
Position = Binary.BaseStream.Position;
if (CurrentData == "FF")
{
if (ImageFound == false)
{
if (Binary.ReadByte().ToString("X2") == "D8")
{
Console.WriteLine("Header Found!");
ImageFound = true;
Binary.BaseStream.Position = Position;
continue;
}
}
if (ImageFound == true)
{
if (Binary.ReadByte().ToString("X2") == "D9")
{
Console.WriteLine("Footer Fount!");
ImageFound = false;
Image.Append(Binary.ReadByte().ToString("FFD9"));
File.WriteAllText(new Random().Next().ToString() + ".bin", Image.ToString());
Console.ReadLine();
continue;
}
}
}
if (ImageFound == true)
{
Image.Append(CurrentData);
continue;
}
}
.