<%
':::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::
':::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::
'::: BMP,GIF,JPG和PNG ::::
':::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::
':::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::
'::::::::
':::此功能從任何:::獲取指定數量的字節
'::: file,從偏移開始(基數1)::::
'::::::::
':::通過::::
'::: flnm => filespec to read ::::
'::: offset =>偏移開始閱讀::::
'::: bytes =>讀多少個字節讀::::
'::::::::
':::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::
函數getBytes(flnm,偏移,字節)
昏暗的objfso
昏暗的objftemp
昏暗的objTextStream
昏暗的lngsize
下一個錯誤簡歷
設置objfso = createObject(scripting.filesystemobject)
'首先,我們得到文件大小
設置objftemp = objfso.getfile(flnm)
lngsize = objftemp.size
設置objftemp =沒有
fsoforreading = 1
設置objtextStream = objfso.opentextfile(flnm,fsoforreding)
如果偏移> 0,則
strbuff = objtextstream.read(offset -1)
如果結束
如果字節= -1,請全部獲取!
getBytes = objtextstream.read(lngsize)'readall
別的
getBytes = objtextstream.read(bytes)
如果結束
objTextStream.Close
設置objTextStream =沒有
設置objfso =沒有
結束功能
':::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::
'::::::::
':::函數將兩個字節轉換為數字值(long)::::::
':::( Little-Endian和Big-Endian):::::
'::::::::
':::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::
功能lngconvert(strtemp)
lngconvert = clng(asc(left(strtemp,1))) +((ASC(右(strtemp,1)) * 256))))))))
結束功能
函數lngconvert2(strtemp)
lngconvert2 = clng(asc(右(strtemp,1))) +((asc(左(strtemp,1)) * 256))))))))
結束功能
':::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::
'::::::::
':::此功能可以完成大部分實際工作。它將嘗試:::
':::讀取任何文件,無論擴展如何,will :::::
':::確定它是否是圖形圖像。 :::
'::::::::
':::通過::::
'::: flnm => filespec to read ::::
'::: width =>圖像的寬度::::
':::高度=>圖像高度::::
'::: depth =>顏色深度(顏色數量):::
'::: strimagetype =>圖像類型(例如GIF,BMP等)::::::
'::::::::
':::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::
功能GFXSPEX(FLNM,寬度,高度,深度,刻板型)
昏暗的strpng
昏暗的strgif
DIM STRBMP
昏暗的strype
strtype =
strimagetype =(未知)
gfxspex = false
strpng = chr(137)&chr(80)&chr(78)
strgif = gif
strbMp = chr(66)&chr(77)
strtype = getBytes(flnm,0,3)
如果strtype = strgif,則是gif