本文整理自网络,侵删。
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 直接将html字符串读入webbrowser中
Delphi环境下基于spcomm控件开发串口通讯报文字节丢失的问题解决
ttreeview的两个事件ondragdrop、ondragover 实现自动拖放功能
更多相关阅读请进入《Delphi》频道 >>