作者lsmptt (虚心向学)
看板C_Sharp
标题[问题]有关HDR的问题
时间Mon Dec 4 14:50:10 2006
:
:
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
1F:→ aimshield:数字不可以随便设哦 那个档案有一定格式 12/04 20:49