[問題]有關HDR的問題

看板C_Sharp作者 (虛心向學)時間17年前 (2006/12/04 14:38), 編輯推噓0(001)
留言1則, 1人參與, 最新討論串1/2 (看更多)
: : 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
文章代碼(AID): #15Sy9zWl (C_Sharp)
文章代碼(AID): #15Sy9zWl (C_Sharp)