判断头几个字节: function IsJpegFile(FileName: string): Boolean; const RightBuf : ..] of Byte = ($FF,$D8,$FF,$D9); var Buf: ..] of Byte; begin FillChar(Buf, , ); ) do begin Position := ; ReadBuffer(Buf[], ); Position := Size-; ReadBuffer(Buf[], ); Free; end;…