[問題]有關HDR的問題
:
:
FileStream fs = new FileStream(file_name, FileMode.Open, FileAccess.Read);
fs.Seek(72, SeekOrigin.Begin);
depths = deCode16L2(fs.ReadByte(), fs.ReadByte());
fs.Seek(42, SeekOrigin.Begin);
cols = deCode16L2(fs.ReadByte(), fs.ReadByte());
rows = deCode16L2(fs.ReadByte(), fs.ReadByte());
slices = deCode16L2(fs.ReadByte(), fs.ReadByte());
:
:
public int deCode16L2(int a, int b)
{
int result = new int();
if (a != 0)
{
a += 255;
}
result = a + b;
return result;
}
這是要讀取HDR圖檔的程式片斷
請問一下,SEEK這個METHOD是在做什麼?72,42這些數字是可以隨便設的嗎?
為什麼cols,rows,depths,slices是這樣得到@@
decode16l2我也不太了解,請各位多多指教
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 163.25.118.159
→
12/04 20:49, , 1F
12/04 20:49, 1F
討論串 (同標題文章)