|
变量名 | 类 型 | 静态 | 数组 | 备 注 | hFile | 整数型 | | | data | 字节集 | | | Hex | 文本型 | | | readSize | 整数型 | | |
hFile = CreateFileW (绝对路径, #FILE_GENERIC_READ, 位或 ( #FILE_SHARE_READ, #FILE_SHARE_WRITE, #FILE_SHARE_DELETE ), #NULL, #OPEN_EXISTING, #FILE_ATTRIBUTE_NORMAL, #NULL )如果真 (hFile = #INVALID_HANDLE_VALUE )返回 (“”)data = 取空白字节集 (16)ReadFile_字节集 (hFile, data, 16, readSize, #NULL )CloseHandle (hFile )如果真 (readSize = 16 )Hex = 字节集_字节集到十六进制 (data )判断 (Hex ≈ “FFD8FF”) 返回 (“JPEG”)判断 (Hex ≈ “89504E470D0A1A0A0000000D49484452”) 返回 (“PNG”)判断 (Hex ≈ “47494638” 或 Hex ≈ “474946383761” 或 Hex ≈ “474946383961”) 返回 (“GIF”)判断 (Hex ≈ “49492A00” 或 Hex ≈ “4D4D002A” 或 Hex ≈ “49492A00”) 返回 (“TIFF”)判断 (Hex ≈ “424D”) 返回 (“BMP”)判断 (Hex ≈ “0A”) 返回 (“PCX”)判断 (Hex ≈ “3C”) 返回 (“SVG”)判断 (Hex ≈ “38425053000100000000000000”) 返回 (“PSD”)判断 (Hex ≈ “465753”) 返回 (“SWF”)判断 (Hex ≈ “D7CDC69A0000”) 返回 (“WMF”)判断 (Hex ≈ “01000000”) 返回 (“EMF”)判断 (Hex ≈ “C5D0D3C6”) 返回 (“EPS”)判断 (Hex ≈ “0000020000” 或 Hex ≈ “0000100000”) 返回 (“TGA”)判断 (Hex ≈ “00000100”) 返回 (“ICO”)判断 (Hex ≈ “00000200”) 返回 (“CUR”)判断 (Hex ≈ “52494646”) 判断 (取文本右边 (Hex, 16 ) ≈ “57454250”)返回 (“WEBP”) 返回 (“ANI”) 判断 (Hex ≈ “464F524D”) 返回 (“IFF”)返回 (“”)变量名 | 类 型 | 静态 | 数组 | 备 注 | data | 字节集 | | | Hex | 文本型 | | |
data = 取空白字节集 (16 )data = 取字节集左边 (图片字节集, 16 )Hex = 字节集_字节集到十六进制 (data )判断 (Hex ≈ “FFD8FF”) 返回 (“JPEG”)判断 (Hex ≈ “89504E470D0A1A0A0000000D49484452”) 返回 (“PNG”)判断 (Hex ≈ “47494638” 或 Hex ≈ “474946383761” 或 Hex ≈ “474946383961”) 返回 (“GIF”)判断 (Hex ≈ “49492A00” 或 Hex ≈ “4D4D002A” 或 Hex ≈ “49492A00”) 返回 (“TIFF”)判断 (Hex ≈ “424D”) 返回 (“BMP”)判断 (Hex ≈ “0A”) 返回 (“PCX”)判断 (Hex ≈ “3C”) 返回 (“SVG”)判断 (Hex ≈ “38425053000100000000000000”) 返回 (“PSD”)判断 (Hex ≈ “465753”) 返回 (“SWF”)判断 (Hex ≈ “D7CDC69A0000”) 返回 (“WMF”)判断 (Hex ≈ “01000000”) 返回 (“EMF”)判断 (Hex ≈ “C5D0D3C6”) 返回 (“EPS”)判断 (Hex ≈ “0000020000” 或 Hex ≈ “0000100000”) 返回 (“TGA”)判断 (Hex ≈ “00000100”) 返回 (“ICO”)判断 (Hex ≈ “00000200”) 返回 (“CUR”)判断 (Hex ≈ “52494646”)判断 (取文本右边 (Hex, 16 ) ≈ “57454250”)返回 (“WEBP”) 返回 (“ANI”) 判断 (Hex ≈ “464F524D”) 返回 (“IFF”)返回 (“”)
加上了WEBP格式的识别,然后加了个从字节集识别~
来自群组: 热心网友 |
评分
-
查看全部评分
|