如果你的这个jpg文件不是有效的jpg文件(符合标准的),那么这个这个过程会退出,不会显示图片。 ---------------------------------------------------------- procedure LoadFromFileJpeg(const FileName: WideString);Description LoadFromFileJpeg loads the image from a JPEG file.If the file does not represent a valid image format, the Aborting property will be true. FileName is the file name with extension. -------------------------------------------------------- 可以用FindFileFormat 来查看一下图片的格式。 ---------------------------------------------------------------- Examplevar ss:TIOFileType; begin ss:=FindFileFormat('myfile.dat',false); if ss=ioGIF then ImageEnView1.IO.LoadFromFileGIF('myfile.dat') else if ss=ioJPEG then ImageEnView1.IO.LoadFromFileJpeg('myfile.dat'); end;
----------------------------------------------------------
procedure LoadFromFileJpeg(const FileName: WideString);Description
LoadFromFileJpeg loads the image from a JPEG file.If the file does not represent a valid image format, the Aborting property will be true.
FileName is the file name with extension.
--------------------------------------------------------
可以用FindFileFormat 来查看一下图片的格式。
----------------------------------------------------------------
Examplevar
ss:TIOFileType;
begin
ss:=FindFileFormat('myfile.dat',false);
if ss=ioGIF then
ImageEnView1.IO.LoadFromFileGIF('myfile.dat')
else if ss=ioJPEG then
ImageEnView1.IO.LoadFromFileJpeg('myfile.dat');
end;