本文整理自网络,侵删。
uses JPEG;
function CanLoadFromStream(Stream: TStream): Boolean;var soi, marker: Word; P: Int64;begin P := Stream.Position; try Result := (Stream.Read(soi, SizeOf(soi)) = SizeOf(soi)) and (soi = $D8FF); finally Stream.Position := P; end;end;
来源:http://blog.qdac.cc/?p=5174
相关阅读 >>
Delphi gettempdirectory 获取临时文件夹路径
Delphi edit1.gettextlen 获取编辑框字符数
更多相关阅读请进入《Delphi》频道 >>